Geert Hendrickx wrote:
On Tue, Oct 20, 2009 at 02:04:15PM +0500, rihad wrote:
"The Postfix SMTP server has a number of built-in mechanisms to block or
accept mail at specific SMTP protocol stages."
But the mail could later be filtered etc., so it's a bit early for the
external program to run. I want it to run only if the delivery has been
guaranteed, like as the last content filter through pipe. Nevermind the
body overhead. Possible?
You could replace the virtual(8) delivery agent by a program of your own,
by adding an entry in master.cf and pointing "virtual_transport" to it.
http://www.postfix.org/postconf.5.html#virtual_transport
http://www.postfix.org/master.5.html
Aha, and then if I'd like the original executable to do its work,
_without_ having read the body, will exec'ing it be enough?
#!/bin/sh
# do my own actions with respect to RCPT TO
...
exec /path/to/postfix/virtual $@
And should I expect that multiple addresses in RCPT TO are possible? I'm
afraid that if I use virtual_destination_recipient_limit = 1 performance
will suffer.