On Sat, Dec 22, 2012 at 01:17:20PM +0100, Juerg Reimann wrote: > Hi everybody, > > I need to clear my body_checks in order tu run a script and afterwards > reaload them again. What I currently do is: > > cp /etc/mail/body_checks /etc/mail/body_checks.tmp > > /etc/mail/body_checks > /usr/sbin/postfix reload > sleep 60 > /path/to/my/script > mv /etc/mail/body_checks.tmp /etc/mail/body_checks > /usr/sbin/postfix reload
This is a terrible design, instead send the message into a Postfix instance that never has body checks enabled. See http://www.postfix.org/MULTI_INSTANCE_README.html If your script is sending via SMTP, you can also define a custom smptd(8) on a non-standard port, and an associated custom cleanup(8) service in master.cf(5) that has body_checks disabled. Then use that. master.cf: 2525:127.0.0.1 inet ... smtpd -o cleanup_service_name=nobc-cleanup nobc-cleanup unix ... cleanup -o body_checks= then send the mail in question to port 2525. -- Viktor.
