Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-2010, 10:22 AM
Intermediate Member
 
Posts: 21
Default Weirdest Zimbra Problem Ever (postfix main.cf file changes)

Here's my strange dilemma. I am running ZCS open source version 6.0.7. I have a backup script that does the usual rsync, then stop zimbra, rsync again, then start zimbra back up.

However, lately there is a new problem. When zimbra starts back up, postfix fails to run. Here's what's happening:

When I look at the main.cf file in /opt/zimbra/postfix/conf/ it has a line that looks like this:

smtpd_recipient_restrictions = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit

However, when I run my backup script and stop/start services, most of the time the line blanks out like this:

smtpd_recipient_restrictions =

Which postfix does not like. It generates errors like:

zimbra postfix/smtpd[6101]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit

It's doing that because the list is blank. Is there anything in Zimbra that might be resetting this value to null upon restart?

Here's how I fix it, for now, until a better solution comes along:

1. cd /opt/zimbra/postfix/conf/
2. cp main.cf.backup main.cf (I made a backup of the GOOD file)
3. cd /opt/zimbra/bin/
4. ./postfix stop && ./postfix start

That seems to correct it. That tells me that somewhere in Zimbra it's rebuilding/reconfiguring the main.cf file.

Any help would be appreciated with this very unusual problem.

Thanks,

Dennis McEntire
Reply With Quote
  #2 (permalink)  
Old 08-08-2010, 07:37 AM
Moderator
 
Posts: 1,554
Default

zimbra does indeed rewrite the main.cf upon each start. most postfix values can be controlled via localconfig keys. do

Code:
zmlocalconfig | grep postfix
and you'll see them
Reply With Quote
  #3 (permalink)  
Old 08-09-2010, 11:19 AM
Intermediate Member
 
Posts: 21
Default Now how do I ...

I don't see the directive in there, smtpd_recipient_restrictions in the zmlocalconfig list. Is there any way to ADD this in so that it might stick when I restart Zimbra?

Are there separate configs somewhere containing the postfix parameters that are used to rebuild main.cf upon restarting?

Thanks,

Dennis
Reply With Quote
  #4 (permalink)  
Old 08-11-2010, 09:04 AM
Moderator
 
Posts: 1,554
Default

see

/opt/zimbra/conf/postfix_recipient_restrictions.cf

err not sure if thats the same in version 5.x, are you still using 5.0.6?
Reply With Quote
  #5 (permalink)  
Old 08-11-2010, 09:34 AM
Eno Eno is offline
Member
 
Posts: 13
Default

I get the same problem this morning, I don't know why it's not updating properly but there is a workaround. According to zmmta.cf :
Quote:
POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf
So looking into into postfix_recipient_restrictions.cf to get values, now see what do we have into it :
Quote:
reject_non_fqdn_recipient
permit_sasl_authenticated
permit_mynetworks
reject_unauth_destination
reject_unlisted_recipient
%%contains VAR:zimbraMtaRestriction reject_invalid_hostname%%
%%contains VAR:zimbraMtaRestriction reject_non_fqdn_hostname%%
%%contains VAR:zimbraMtaRestriction reject_non_fqdn_sender%%
%%contains VAR:zimbraMtaRestriction reject_unknown_client%%
%%contains VAR:zimbraMtaRestriction reject_unknown_hostname%%
%%contains VAR:zimbraMtaRestriction reject_unknown_sender_domain%%
%%explode reject_rbl_client VAR:zimbraMtaRestrictionRBLs%%
%%contains VAR:zimbraMtaRestriction check_policy_service unixrivate/policy%%
permit
The file is not empty but after a restart, smtpd_recipient_restrictions in postfix conf file looks like this :
Quote:
smtpd_recipient_restrictions =
That's why we're getting those errors. I found a hack to get rid of this bug, it's not beautifull but it's working.
You have to comment the line :
Quote:
# POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf
And then to hard code informations into the main.cf :
Quote:
smtpd_recipient_restrictions = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit

Last edited by Eno; 08-11-2010 at 09:45 AM..
Reply With Quote
  #6 (permalink)  
Old 08-11-2010, 01:05 PM
Intermediate Member
 
Posts: 21
Default Thank you!

Thanks for researching this, and I've learned a lot about the zmmta.cf file that's very interesting. I hope that a pound sign (#) will comment out that line, that's what I changed so we'll see what happens.

Funny that the problem happened to you as well, that's strange. The version I am using is 6.0.7 and it's the open source edition.

Thanks again,

Dennis
Reply With Quote
  #7 (permalink)  
Old 11-02-2010, 08:03 AM
Beginner Member
 
Posts: 1
Default

I've got the same problem two days ago with 6.0.8 and got approximately to the same solution, but instead of commenting the line:
Code:
POSTCONF smtpd_recipient_restrictions FILE postfix_recipient_restrictions.cf
I've just changed it to the values I wanted to be in main.cf:
Code:
POSTCONF smtpd_recipient_restrictions permit_mynetworks,reject_unauth_destination
Then after Zimbra restart the main.cf has the proper line:
Code:
smtpd_recipient_restrictions=permit_mynetworks,reject_unauth_destination
I put more details about it here:
UNIX Systems Administration: Zimbra 6.0.8 mail processing issue
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.