mail_parser_wrapper
% cat /home/aeicauto/.forward kent@giseis.alaska.edu, "|/home/aeicauto/mail_parser_wrapper || exit 75"Note that this assumes a copy of mail_parser_wrapper has been placed in the relevant home directory. Making a local copy is useful if any edits are necessary, for example to environment variables. Usually it is necessary to remove group and world write permission from the mail_parser_wrapper executable and from the .forward file. The mail_parser_wrapper may also be launched via procmail(1), approximately as follows. First, forward recipients mail to procmail:
% cat ~/.forward "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #user"Second, run the mail_parser_wrapper from within a procmail rule:
% cat /home/rt/.procmailrc :0: * ^X-Spam-Flag: Spam YES Imapmail/Spam :0w |/home/rt/mail_parser_wrapperOf course, one might want to put procmail filter rules into this to send only certain emails to the mail_parser. This should probably be considered a pre-filtering operation since the mail_parser(1) itself does some subsetting of mails based on subject and sender. Note that to deliver a carbon copy of the email to the user, in addition to sending the mail off to mail_parser, one should use the procmail 'c' flag:
:0cw |/home/rt/mail_parser_wrapper
mail_parser(1), autodrm(1), autodrm_wrapper(1)
Kent Lindquist Lindquist ConsultingThis script is modeled on the Antelope autodrm_wrapper script by Dan Quinlan.