Hi,
after some hacking around with deliver.c, I gave it up and decided to
write a small standalone program that would filter the message through
a filter and if the filter successfully returns, it will
use sendmail to reinject the changed mail and upon success of
sendmail, it will discard the original mail.

In order not to create endless loop, the program will add a
(configurable) header line:
X-reinject_filter: %FILTERNAME pid %pid

The filter is used the following way:

reinject_filter "FILTERNAME" "/full/path/to/filter arguments for filter" "acceptable 
exit codes"

FILTERNAME is simply used to designate what type of filter it is
running and to make it possible to run reinject_filter more than once
on a mail (OF COURSE THIS MEANS THAT THE MAIL GETS REINJECTED EACH
TIME, possibly causing big performance penalties).

The second parameter should be self explanatory.

Acceptable exit codes is a space separated list of integers. If the
exit code of the filter is any of the ints specified, the output of
the filter will be reinjected.


I'd appreciate any testing and comments, of course!

Regards,
Gabriel



-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to