Hostname Question

Home » CentOS » Hostname Question
CentOS 8 Comments

CentOS 6.4, clean install. Zimbra 8.0.3

I am behind a PfSense box using a virtual IP. So the IP of the box is

I entered this in /etc/hosts: localhost localhost.localdomain localhost4
::1 localhost localhost.localdomain localhost6
localhost6.localdomain6 mail

but `hostname -f` says:

$ hostname -f hostname: Unknown host

Do I need to put the public IP for where this record resolves? Since PFSense is forwarding traffic from it to the virtual IP?


8 thoughts on - Hostname Question

  • Jason T. Slack-Moehrle wrote:

    Quick check: is the hostname showing in /var/log/messages? If not, did you either reboot the box, or set the hostname manually, or restart the network? It won’t take effect until you do one of those.


  • Hi Mark,

    I did a reboot and not `hostname -f` says: mail.

    But I think that will still be wrong in terms of what Zimbra is looking for.

    When I did the install I set the hostname to `webserver.localdomain`, so I
    see in /var/log/messages:
    `Apr 7 12:35:48 webserver kernel: SRAT: PXM 0 -> APIC 0 -> Node 0`

    I think I might need to trick Zimbra bu changing: mail



  • put the hostname in /etc/sysconfig/network, as ..


    $ more /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no GATEWAY=x.y.w.x

  • John,

    Weird question, but if web and e-mail are going to be on the same box. Do I
    need to do mail.hostname.tld or can I just to hostname.tld?

    For the domain. for DNS A-record: @ is the public IP
    A-record mail is the public IP.

    Mx record is 0 mail