If anyone kept the original main.cf (rather than overwriting and/or deleting it), the permissions on the file would be useful. Please also see https://bugzilla.zimbra.com/show_bug.cgi?id=55541
1) no, even after a postfix stop/start, main.cf is unchanged.
Originally Posted by quanah
[zimbra@zimbra ~]$ echo REWRITE mta | nc -w 120 localhost 7171
SUCCESS REWRITES COMPLETE
[zimbra@zimbra ~]$ ll /opt/zimbra/postfix/conf/main.cf
-rw-r--r-- 1 root root 2496 Feb 8 04:44 /opt/zimbra/postfix/conf/main.cf
main.cf still unchanged
changing owner/group to root.postfix or zimbra.zimbra didn't fix the issue
changing permission (for test purposes) to 777 didn't fix the issue
/etc/sudoers also looking good:
%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmstat-fd *
%zimbra ALL=NOPASSWD:/opt/zimbra/postfix/sbin/postfix, /opt/zimbra/postfix/sbin/postalias, /opt/zimbra/postfix/sbin/qshape.pl, /opt/zimbra/postfix/sbin/postconf,/opt/zimbra/postfix/sbin/postsuper
restarting mta/zimbra with no main.cf in place generates this config:
-rw-r--r-- 1 root root 45 Feb 8 05:28 main.cf
[zimbra@zimbra conf]$ cat main.cf
setgid_group = postdrop
mail_owner = postfix
finally tracked down the problem:
zmconfigd fails to execute the postconf stuff (exit code 1):
2011-02-08 00:57:41,536 zmconfigd ERROR [10413-postconf] Executed: /opt/zimbra/postfix/sbin/postconf .... my config, lots of stuff ...... returned 1 (0 - 79) (1.28 sec)
but when I execute the same command manually it works fine and main.cf is getting updated correctly (exit code 0):
[zimbra@zimbra log]$ /opt/zimbra/postfix/sbin/postconf -e mail_owner='postfix' bounce_notice_recipient='postmaster' ..........my config, lots of stuff ........
[zimbra@zimbra log]$ echo $?
I'm not sure yet, I have a system now where I can reproduce the various issues. There is more than one problem in play for sure. postconf behavior changed between postfix 2.6 and postfix 2.7 is part of the issue.
There are two issues involved, but the primary one people are hitting is that zmconfigd fails when postconf is called with a long enough argument list. See the previously mentioned bug. There is also a minor issue with how main.cf gets created when it doesn't exist, but that's a rare occurence. If you hit the issue with postfix, do *not* delete main.cf. Instead, I suggest examining the zmconfigd.log file and running the postconf command it logs from the command line as a workaround.
FYI: Had the same problem after upgrading from 6.0.10 to 7.0.0 GA an Ubuntu 10.04 64-Bit LTS (empty main.cf). After copying main.cf from 6.0.10, postfix is working again!
Hello! This problem will be on Ubuntu 8.04 Zimbra 7? If yes, simply copy main.cf from backup is universal solution, Or it is better to wait bugfixes and version 7.0.1? Can I update production server now?
Originally Posted by tobru
I don't know if you'll have the same problem. But I think it is save to upgrade and if you see that the file is empty after the upgrade, simply copy the backup file and you should be fine...
DON'T FORGET TO MAKE A (WORKING) BACKUP! And if it's your production server, do it on a less noisy hour (in the evening / night)
The solution is listed above.
Originally Posted by GlooM
That's a decision to do that is yours to make. Try it and see if you want to live dangerously, try it on a test server or wait for the bug to be closed and a fix issued. ;) Whatever you decide make sure you take adequate backups of your server.
Originally Posted by GlooM
Thanks Quanah for the input and explanation. Besides it is worth noting that some have had safe upgrades from 6.0.9 to 7.0 without hitting this bug.