Received mail bounced

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
pheitman
Posts: 8
Joined: Fri Sep 12, 2014 9:57 pm

Received mail bounced

Post by pheitman »

I've sent my first email to my new Zimbra mta. But unfortunately it bounced. zimbra.log reports:
status=bounced (Host or domain name not found. Name service error for name=localhost.localdomain type=A: Host not found)
But my /etc/hosts certainly has the line
127.0.0.1 localhost.localdomain localhost
(as the first line of two - the second has my 'real' host name and ip address)
Note that I added an entry for the domain in the admin console and I added a user for that domain as well. I sent an email to that user. Also note that the name of the host is not the same as the name of the domain - this host is to handle mail for the domain.
Can anyone tell me 1) why it bounced and 2) how to fix it so that the mail gets delivered to the user?
Peter
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

Received mail bounced

Post by marcmac »

Disabling DNS lookups in the admin UI and restarting postfix should fix this.
The problem is that postfix doesn't look at your hosts file, unless you force it to. Otherwise, it prefers DNS
pheitman
Posts: 8
Joined: Fri Sep 12, 2014 9:57 pm

Received mail bounced

Post by pheitman »

Thank you - that appears to have fixed the local delivery problem. I don't understand it though. My /etc/host.conf says order hosts,bind which means that if zimbra uses the resolver library I would expect that localhost.localdomain would be found in hosts before a DNS lookup was done. Do they do something else?
Peter
17629anand
Zimbra Alumni
Zimbra Alumni
Posts: 273
Joined: Fri Sep 12, 2014 9:53 pm

Received mail bounced

Post by 17629anand »

[quote user="pheitman"]My /etc/host.conf says order hosts,bind which means that if zimbra uses the resolver library I would expect that localhost.localdomain would be found in hosts before a DNS lookup was done.[/QUOTE]Postfix looks in DNS, regardless of what your nsswitch.conf says, unless this variable is set:

http://www.postfix.org/postconf.5.html# ... ns_lookups
pheitman
Posts: 8
Joined: Fri Sep 12, 2014 9:57 pm

Received mail bounced

Post by pheitman »

Thanks for the pointer - I never knew that. I've configured postfix, but the tutorial I followed also set up amavis as part of the delivery route. The configuration for the amavis-smtp process also disabled the dns lookups. I never looked closely enough at what I was doing to see it.
Learn something new every day :)
Peter
Post Reply