rhn a écrit :
> Hi
> I have a question regarding launching external programs.
> What I want to do is to have an external program receive a copy of every
> email, or at least the headers of it - I need it for a new mail
> notification feature to my small mail server.
> 
> I know so far that I need to edit master.cf to include a line with a
> program in spawn or pipe "mode". I don't know how to edit main.cf to pass a
> copy of every email to it.
> 


if you don't care about envelope recipients, you can use always_bcc. if
your program wants the envelope recipients, then use recipient_bcc_maps
with a pcre map that contains:

/(.*)@([...@]*)/                $1...@bcc.example.com

then use transport_maps to deliver the copies to your program. for example:

bcc.example.com         mypipe:

note that if the message is sent to multiple recipients, your program
will get multiple copies.

and of course, your program must read the _whole_ message before existing.

> [snip]

Reply via email to