[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Ask questions about your setup or get help installing ZCS server (ZD section below).
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by quanah »

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
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
bku09
Posts: 13
Joined: Sat Sep 13, 2014 12:58 am

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by bku09 »

[quote user="quanah"]Does the problem reappear if you run (as zimbra):

postfix stop

postfix start
If it does, then we'll actually have to do the following, since configrewrite squelches its output:
1. postfix stop (as zimbra user)

2. echo REWRITE mta | /bin/nc -w 120 localhost 7171 (as zimbra user)
--Quanah[/QUOTE]
1) no, even after a postfix stop/start, main.cf is unchanged.

2)

[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
edit:

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/openldap/libexec/slapd

%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmslapd

%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

%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmqstat,/opt/zimbra/libexec/zmmtastatus

%zimbra ALL=NOPASSWD:/opt/zimbra/libexec/zmmailboxdmgr

%zimbra ALL=NOPASSWD:/opt/zimbra/bin/zmcertmgr
edit2:

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
bku09
Posts: 13
Joined: Sat Sep 13, 2014 12:58 am

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by bku09 »

finally tracked down the problem:
zmconfigd fails to execute the postconf stuff (exit code 1):
/opt/zimbra/log/zmconfigd.log:

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 $?

0
any ideas?
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by quanah »

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.
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by quanah »

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.
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
tobru
Posts: 37
Joined: Fri Sep 12, 2014 11:11 pm

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by tobru »

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!
GlooM
Advanced member
Advanced member
Posts: 127
Joined: Sat Sep 13, 2014 12:50 am

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by GlooM »

[quote user="tobru"]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![/QUOTE]
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?
tobru
Posts: 37
Joined: Fri Sep 12, 2014 11:11 pm

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post 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)
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by phoenix »

[quote user="GlooM"]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?[/QUOTE]The solution is listed above.
[quote user="GlooM"]Can I update production server now?[/QUOTE]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.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
fyd
Outstanding Member
Outstanding Member
Posts: 356
Joined: Sat Sep 13, 2014 1:36 am

[SOLVED] Zimbra 6 -> 7 - Zimbra does not know its own virtual hosts

Post by fyd »

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.
Post Reply