Difference between revisions of "Ajcody-Hostname-DNS"

Line 1: Line 1:
{{Unsupported}}{| width="100%" border="0"
{{BC|Zeta Alliance}}                         <!-- Note, this will also add [[Category: Zeta Alliance]] to bottom of wiki page. -->
| bgcolor="orange" | [[Image:Attention.png]] - This article is NOT official Zimbra documentation. It is a user contribution and may include unsupported customizations, references, suggestions, or information.
__FORCETOC__                              <!-- Will force a TOC regards of size of article. __NOTOC__ if no TOC is wanted. -->
<div class="col-md-12 ibox-content">
==Hostname And DNS Issues==              <!-- Normally will reflect page title. Is listed at very top of page. -->
{{KB|{{ZETA}}|{{ZCS 8.5}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}}            <!-- Can only handle 3 ZCS versions. -->
{{WIP}}                                               <!-- For pages that are "work in progress". -->
==Hostname And DNS Issues==
===Actual Hostname And DNS Issues Homepage===
===Actual Hostname And DNS Issues Homepage===

Latest revision as of 17:07, 20 June 2016

Hostname And DNS Issues

   KB 2702        Last updated on 2016-06-20  

(0 votes)
24px ‎  - This is Zeta Alliance Certified Documentation. The content has been tested by the Community.

Actual Hostname And DNS Issues Homepage

Please see Ajcody-Hostname-DNS

Hostname resolution issues and testing commands

Allot of failed installs are because administrators are skipping the steps to make sure resolution is working.

Check your /etc/hosts file. You should have the localhost similar to the one below. Your ZCS server name should be replaced with the zimbra.test.com and zimbra fields. The IP address should be the IP address bound to the network interface [ip addr or ifconfig -a to confirm].	localhost.localdomain	localhost	zimbra.test.com         zimbra

If your ZCS server is behind a firewall or is being NAT'd. Make sure that resolution for the hostname on the ZCS server returns the internal IP information rather than the external IP. To test:

hostname -f


domainname -f

As long as one of the above returns the full hostname, use the command for the following. The MX lookups depend on how you are doing your mail domain and server hostname.

host `hostname -f`
 zimbra.test.com has address
host -t MX `domainname -f`
 zimbra.test.com mail is handled by 10 zimbra.test.com.
host -t MX `domainname -d`
   test.com mail is handled by 10 zimbra.test.com.

You should also have reverse records (PTR) as well. Replace using your internal ip address, it should return something like:

host domain name pointer zimbra.test.com

Please review wiki page on split-DNS. This also shows the basics of actually setting up DNS/Bind on Linux:


The following is a more complete how-to for setting up DNS/Bind:



Also review the variable lmtp_host_lookup to see if it applies to your situation:


su - zimbra
zmlocalconfig -e postfix_lmtp_host_lookup=native
postfix reload

If the above value doesn't exist in your ZCS version, then you would do the following [Older ZCS version]:

su - zimbra
postconf | grep host_lookup
postconf -e lmtp_host_lookup=native
postfix reload


Similar to above.


Similar to above.

Local DNS-BIND Configuration Example

The full blown example on setting up BIND is at Split_DNS article.

Detailed Example Zone Files

This example is from a CentOS5 test box I have behind a firewall. I actually setup a dynamic dns using a valid domainname, I've replaced my "real" domainname below with "example". I'm using DynDNS to do this.

Directory Structure

The default setup is a chroot configuration of BIND.

  • The root of the configuration files is /var/named/chroot/ .
  • The general bind configuration files are in /var/named/chroot/etc/
    • Files you'll have there:
      • db.cache
      • localtime
      • named.conf
      • rndc.key
  • The directory where your zone files will reside is /var/named/chroot/var/named/
    • I have in this directory the following:
      • data (a directory that's empty)
      • slaves (a directory that's empty)
      • internal.example.com.hosts (file for A, NS, MX, CNAME, etc. records)
      • 0.168.192.rev (file for PTR records)
/var/named/chroot/etc/named.conf example

Here's my named.conf file I'm using:

options {
        directory "/etc";
        pid-file "/var/run/named/named.pid";

zone "." {
        type hint;
        file "/etc/db.cache";

zone "internal.example.com" {
        type master;
        file "/var/named/internal.example.com.hosts";
zone "0.168.192.in-addr.arpa" {
        type master;
        file "/var/named/0.168.192.rev";

The _xmpp-server._tcp entries are related to jabber/xmpp and shouldn't be necessary for a default zimbra install. I'll leave them here just for a reference in case they are useful for others depending on the circumstances.

I had a second test box "mail4" at one point but I shut it down.

The one MX record with the starting blank space :

                IN      MX      10 mail3

would "assume" for the internal.example.com domain.

My only physical box is "mail3". The other names and domains are done so I can configure multiple domains on this box. The blank space MX record (for internal.example.com) is also setup on mail3. So, in total my mail3 box has zimbra configured to handle mail for these five domains:

  • internal.example.com
  • mail3.internal.example.com
  • secondary.internal.example.com
  • move.internal.example.com
  • alias.internal.example.com
$ttl 38400
internal.example.com.  IN      SOA     internal.example.com. ajcody.mail3.internal.example.com. (
                        38400 )
                IN      NS      mail3
                IN      MX      10 mail3
mail3           IN      MX      10 mail3
secondary       IN      MX      10 mail3
move            IN      MX      10 mail3
alias           IN      MX      10 mail3
mail4           IN      MX      10 mail4
mail3           IN      A
mail4           IN      A
_xmpp-server._tcp       SRV      5 0 5269 mail3
_xmpp-server._tcp.mail3         SRV     5 0 5269 mail3
_xmpp-server._tcp.secondary     SRV     5 0 5269 mail3
_xmpp-client._tcp       SRV      5 0 5269 mail3
_xmpp-client._tcp.mail3         SRV     5 0 5269 mail3
_xmpp-client._tcp.secondary     SRV     5 0 5269 mail3
$ttl 38400
$ORIGIN 0.168.192.in-addr.arpa.
@       IN      SOA     mail3.internal.example.com. ajcody.mail3.internal.example.com. (
                        38400 )
                                IN      NS      mail3.internal.example.com.
16                              IN      PTR     mail3.internal.example.com.
17                              IN      PTR     mail4.internal.example.com.

Split-DNS - But I Already Have Bind Running Internally?

You should investigate using ACL's and the views options for BIND to effective setup the "purpose" of split-dns situation without actually running it on a separate server.

Please see:

Other Variables That Are Effected By Lookups

zimbraDNSCHeckHostname New In 5.0.11

If your MX records point to a spam-relay or any other external non-Zimbra server, enter the name of that server in the Inbound SMTP host name field. The "Check MX" button in the admin console compares the domain's MX records in DNS against the zimbraDNSCheckHostname setting, if set. If this attribute is not set, the domain MX setting is checked against zimbraSmtpHostname.


zmprov gs `zmhostname` zimbraSmtpHostname


zmprov gs `zmhostname` zimbraMtaRelayHost


zmprov gs `zmhostname` zimbraMtaDnsLookupEnabled


zmprov gs `zmhostname` zimbraAdminConsoleDNSCheckEnabled


postconf lmtp_host_lookup
 lmtp_host_lookup = dns


postconf smtp_host_lookup
 smtp_host_lookup = dns

Jump to: navigation, search