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?