Kennedy Clark
2005-Apr-09 21:32 UTC
[CentOS] MailScanner With One vs Two Postfix Instances
An interesting point came up while recently discussing my Postfix virtual_alias issues with the MailScanner list. Apparently there is some risk with the "two instances of postfix" approach described in: http://www.hughesjr.com/content/view/12/30/Guides It sounds like Postfix and MailScanner can step on each other in the deferred queue. They recommended the single Postfix instance "hold" mechanism recommended here: http://www.sng.ecs.soton.ac.uk/mailscanner/install/postfix.shtml Here are the steps I used to convert: 1) service MailScanner stop 2) Edit MailScanner.conf and change Incoming Queue Dir = /var/spool/postfix.in/deferred to Incoming Queue Dir = /var/spool/postfix/hold 3) Rename /etc/postfix.in to /etc/postfix.old-in 4) Rename /var/spool/postfix.in to /var/spool/postifx.old-in 5) Edit /etc/postfix/master.cf and uncomment the "smtp inet n - n - - smtpd" that was commented out in Step #12 of the 2-step instructions 6) Edit /etc/postfix/main.cf and add: header_checks = regexp:/etc/postfix/header_checks 7) Create /etc/postfix/header_checks containing: /^Received:/ HOLD 8) service MailScanner start And you should be back in business. Note that the /etc/init.d/MailScanner script still references both an in and out Postfix instance; however, in looking at the code, once /etc/postfix.in is gone/renamed the "in" startup action becomes a no-op. I should also point out that there is absolutely NO implied criticism of the SUPERB guides Johnny has put out. I have found them to be extremely helpful -- thanks, Johnny! Regards, Kennedy
Johnny Hughes
2005-Apr-09 23:34 UTC
[CentOS] MailScanner With One vs Two Postfix Instances
On Sat, 2005-04-09 at 17:32 -0400, Kennedy Clark wrote:> An interesting point came up while recently discussing my Postfix > virtual_alias issues with the MailScanner list. Apparently there is > some risk with the "two instances of postfix" approach described in: > http://www.hughesjr.com/content/view/12/30/Guides > > It sounds like Postfix and MailScanner can step on each other in the > deferred queue. They recommended the single Postfix instance "hold" > mechanism recommended here: > http://www.sng.ecs.soton.ac.uk/mailscanner/install/postfix.shtml > > Here are the steps I used to convert: > > 1) service MailScanner stop > > 2) Edit MailScanner.conf and change > Incoming Queue Dir = /var/spool/postfix.in/deferred > to > Incoming Queue Dir = /var/spool/postfix/hold > > 3) Rename /etc/postfix.in to /etc/postfix.old-in > > 4) Rename /var/spool/postfix.in to /var/spool/postifx.old-in > > 5) Edit /etc/postfix/master.cf and uncomment the "smtp inet n - n - - > smtpd" that was commented out in Step #12 of the 2-step instructions > > 6) Edit /etc/postfix/main.cf and add: > header_checks = regexp:/etc/postfix/header_checks > > 7) Create /etc/postfix/header_checks containing: > /^Received:/ HOLD > > 8) service MailScanner start > > And you should be back in business. Note that the > /etc/init.d/MailScanner script still references both an in and out > Postfix instance; however, in looking at the code, once > /etc/postfix.in is gone/renamed the "in" startup action becomes a > no-op. > > I should also point out that there is absolutely NO implied criticism > of the SUPERB guides Johnny has put out. I have found them to be > extremely helpful -- thanks, Johnny!No offense taken ... :) The new method is a bit easier, and I am working now on a guide for CentOS-4 that does it the new way and uses cyrus-imapd. I have used the other way (two postfixes) on several high volume servers, and have personally had no problems. Other people have said they sometimes have issues with the two postfix setup. As soon as we finish CentOS-4.1 (or maybe before, depending on how long RH takes to go from the beta update1 to it's release), I should be able to change my CentOS-3.x guide to the single postfix instance mode and get a CentOS-4 postfix guide out the door. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20050409/080592ca/attachment-0001.sig>
Kennedy Clark
2005-Apr-10 00:35 UTC
[CentOS] MailScanner With One vs Two Postfix Instances
On Apr 9, 2005 7:34 PM, Johnny Hughes <mailing-lists at hughesjr.com> wrote:> > > > I should also point out that there is absolutely NO implied criticism > > of the SUPERB guides Johnny has put out. I have found them to be > > extremely helpful -- thanks, Johnny! > > No offense taken ... :)Good. I was a little worried about that. :-)> > The new method is a bit easier, and I am working now on a guide for > CentOS-4 that does it the new way and uses cyrus-imapd. > > I have used the other way (two postfixes) on several high volume > servers, and have personally had no problems. Other people have said > they sometimes have issues with the two postfix setup. >On a related point: I have been reading over in the postfix user list archives how they are *really* down on mixing MailScanner and Postfix. They say fairly serious queue, email and filesystem corruption is a certainty. Yikes. I'm stressing out now that I just invested a ton of time coming up to speed on MailScanner over the past 10 days. :-\ Anyone have advice for me? Is it really that bad? Does the one instance of Postfix help (or better yet *fix*) this issue? Do recent versions make things any better/worse here? They seem to like amavisd-new.> > As soon as we finish CentOS-4.1 (or maybe before, depending on how long > RH takes to go from the beta update1 to it's release), I should be able > to change my CentOS-3.x guide to the single postfix instance mode and > get a CentOS-4 postfix guide out the door. >Glad to help if I can. Regards, Kennedy