Prabhpal S. Mavi
2012-Apr-25 11:42 UTC
[CentOS] Does SMTP Connection Drop When Posfix Reload is Issued ?
Dear Community Friends Greetings, i work with ISP, we host email service for almost 500+ companies and 200+ mail servers relay through my smart host. i implemented something that when our smart host would become blacklisted. It will automatic switch to next available smart host (which is ready sitting). that mean it will start relaying message through another smart host automatically. i think i must tell little background as well. it is actually php script that perform blacklist check every minute through cron. if it found that IP is blacklisted. It will then insert "relay host =" value in main.cf and reload postfix service. When IP is no more blacklisted it will then remove the same directive from main.cf and reload postfix. everything is working as expected. i have one question, when we reload postfix does it drop active SMTP session? for example lets say that remote SMTP server is delivering message to my postfix that has 8MB attachment. message was not fully transferred. lets say that 4MB was transferred. and i issued "postfix reload". will that connection drop or continue to deliver the mail? Thanks / Regards Prabhpal S. Mavi
Adam Tauno Williams
2012-Apr-25 11:45 UTC
[CentOS] Does SMTP Connection Drop When Posfix Reload is Issued ?
On Wed, 2012-04-25 at 11:42 +0000, Prabhpal S. Mavi wrote:> i think i must tell little background as well. it is actually php script > that perform blacklist check every minute through cron. if it found that > IP is blacklisted. It will then insert "relay host =" value in main.cf and > reload postfix service. When IP is no more blacklisted it will then remove > the same directive from main.cf and reload postfix.Why not propely 'out-source' this to a Postfix map rather than modifying main.cf. Dynamic modification of main.cf is *seriously* brain-damaged in my opinion. Point a map at an LDAP DSA or an RDBMS database and have the application update *that*. Then Postfix checks the map. Nobody needs to get constantly hup'd and you aren't touching configuation files that *should not be writable* anyway.> everything is working as expected. i have one question, when we reload > postfix does it drop active SMTP session?-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20120425/fca1597d/attachment-0002.sig>
Prabhpal S. Mavi
2012-Apr-25 11:57 UTC
[CentOS] Does SMTP Connection Drop When Posfix Reload is Issued ?
Dear Adam Tauno Williams thanks for your response, i am not sure what did you advice. could you please explain nit more if there is any other way to do it. as sounds in your mail. Thanks> On Wed, 2012-04-25 at 11:42 +0000, Prabhpal S. Mavi wrote: >> i think i must tell little background as well. it is actually php script >> that perform blacklist check every minute through cron. if it found that >> IP is blacklisted. It will then insert "relay host =" value in main.cf >> and >> reload postfix service. When IP is no more blacklisted it will then >> remove >> the same directive from main.cf and reload postfix. > > Why not propely 'out-source' this to a Postfix map rather than modifying > main.cf. Dynamic modification of main.cf is *seriously* brain-damaged > in my opinion. Point a map at an LDAP DSA or an RDBMS database and have > the application update *that*. Then Postfix checks the map. Nobody > needs to get constantly hup'd and you aren't touching configuation files > that *should not be writable* anyway. > >> everything is working as expected. i have one question, when we reload >> postfix does it drop active SMTP session? > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >Thanks / Regards Prabhpal S. Mavi
John Doe
2012-Apr-25 12:14 UTC
[CentOS] Does SMTP Connection Drop When Posfix Reload is Issued ?
From: Prabhpal S. Mavi <prabhpal at digital-infotech.net>> i implemented something that when our smart host would become blacklisted. > It will automatic switch to next available smart host (which is ready > sitting). that mean it will start relaying message through another smart > host automatically.Why not find out why you get blacklisted instead of trying to bypass it? You seem to imply that it is something that will happen and often... JD
Bob Hoffman
2012-Apr-25 12:28 UTC
[CentOS] Does SMTP Connection Drop When Posfix Reload is Issued ?
On 4/25/2012 7:42 AM, Prabhpal S. Mavi wrote:> i work with ISP, we host email service for almost 500+ companies and 200+ > mail servers relay through my smart host. > > i implemented something that when our smart host would become blacklisted. > It will automatic switch to next available smart host (which is ready > sitting). that mean it will start relaying message through another smart > host automatically.well, as someone who has been really fighting spam lately I can say that that system will definitely work out quite well and most bulk spammers use something like that. with that many companies and mail servers, I have no idea how you can police them...wow
Earl Ramirez
2012-Apr-25 13:53 UTC
[CentOS] Does SMTP Connection Drop When Posfix Reload is Issued ?
On 25 April 2012 07:42, Prabhpal S. Mavi <prabhpal at digital-infotech.net>wrote:> Dear Community Friends Greetings, > > i work with ISP, we host email service for almost 500+ companies and 200+ > mail servers relay through my smart host. > > i implemented something that when our smart host would become blacklisted. > It will automatic switch to next available smart host (which is ready > sitting). that mean it will start relaying message through another smart > host automatically. > > i think i must tell little background as well. it is actually php script > that perform blacklist check every minute through cron. if it found that > IP is blacklisted. It will then insert "relay host =" value in main.cf and > reload postfix service. When IP is no more blacklisted it will then remove > the same directive from main.cf and reload postfix. > > everything is working as expected. i have one question, when we reload > postfix does it drop active SMTP session? > > for example lets say that remote SMTP server is delivering message to my > postfix that has 8MB attachment. message was not fully transferred. lets > say that 4MB was transferred. and i issued "postfix reload". will that > connection drop or continue to deliver the mail? > > > Thanks / Regards > Prabhpal S. Mavi > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >Postfix reload will not disrupt any connection and in your example the mail will continue to be delivered -- Kind Regards Earl Ramirez