Wietse Venema wrote:
rihad:
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?
You MUST use one of Postfix's deliver programs in master.cf:
local, virtual, pipe, smtp.
The interface to the queue manager is not published and is subject
to change without notice. Programs that depend on Postfix internals
are unsupported and will break with the next release.
Bad. Then I guess content filtering (being last in the chain) is the
only way to go for me.
You have three options as far as filtering goes:
1) While mail is received (http://www.postfix.org/SMTPD_PROXY_README.html)
2) After the mail is received (http://www.postfix.org/FILTER_README.html)
3) While mail is delivered (with local(8, a shell command in
~/.forward, or with pipe(8), a parametrized shell command).
Ours is a mass-mail hosting solution with virtual(8), so local(8) and
~/.forward can't be used? pipe(8) is the only option I guess. Given this
maildrop example in master.cf (we're not using maildrop):
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
could someone please say how I'd configure external program myprog
instead of maildrop? Maybe something like:
myprog unix - n n - - pipe
user=vmail argv=/path/to/myprog -d ${recipient}
myprog will only do something based on ${recipient}, and will ignore the
message itself. What would I put in main.cf to activate the execution of
this program for each email delivered by virtual(8) without affecting
other aspects of the current working system? I'm not very much familiar
with Postfix.
Thanks a lot.