0

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?

Mark Thomas
  • 103
  • 5

1 Answers1

2

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).

yaplik
  • 401
  • 2
  • 3
  • 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 01: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 02:14