Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to set the Postfix lmtp_host_lookup setting to native instead of dns, which is the default. This is an artifact of the way I have Zimbra 7 installed on my Ubuntu 11.04 system, and local mail delivery works when I use /etc/hosts, thus the setting. However, the setting doesn't stick and keeps reverting back to dns, and local mail stops getting delivered until I manually reset it. Here are some details:

Here's the lines containing 'lookup' in postconf:

zimbra@ubuntu:~$ postconf | grep lookup
disable_dns_lookups = no
empty_address_default_transport_maps_lookup_key = <>
empty_address_relayhost_maps_lookup_key = <>
ignore_mx_lookup_error = yes
lmtp_host_lookup = dns
smtp_host_lookup = native
smtpd_null_access_lookup_key = <>
smtpd_peername_lookup = yes

I have previously set smtp_host_lookup to native, and that has remained. But lmtp_host_lookup keeps reverting to the default. I can then issue:

zimbra@ubuntu:~$ postconf -e lmtp_host_lookup=native

And the setting will be there:

zimbra@ubuntu:~$ postconf | grep lookup
disable_dns_lookups = no
empty_address_default_transport_maps_lookup_key = <>
empty_address_relayhost_maps_lookup_key = <>
ignore_mx_lookup_error = yes
lmtp_host_lookup = native
smtp_host_lookup = native
smtpd_null_access_lookup_key = <>
smtpd_peername_lookup = yes

This will start local mail delivery for a while. However, if I restart postfix, it reverts back to 'dns'. And at some seemingly random time, which tends to be a couple days, it will self-revert back to 'dns'.

Now a complete and total hack would be to put the setting in cron, but I want to get to the underlying issue. What could be the problem?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Postfix configuration is rewritten each time service is (re)started. Value for lmtp_host_lookup is taken from zimbra local config named postfix_lmtp_host_lookup as configured in template file for rewritting (/opt/zimbra/conf/zmmta.cf) which contains

POSTCONF lmtp_host_lookup                     LOCAL postfix_lmtp_host_lookup

To edit postfix_lmtp_host_lookup, just run

zmlocalconfig -e postfix_lmtp_host_lookup=native

and restart postfix (zmmtactl restart).

share|improve this answer
    
Thanks, I'll try this. What would cause the file to get overwritten even when I haven't restarted Zimbra? –  Mark Thomas May 11 '11 at 1:10
    
Postfix configuration is not expected to be edited directly. Any change in admin interface, periodic tasks in cron, zmmailboxd or anything else can trigger zmmtactl reload, thus rewriting configuration. –  yaplik May 11 '11 at 2:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.