I think I've stated my question farily well in the comments below. Basicly
the idea of the following recipe is to test to see if 'authorize' is
anywhere in the Subject: and if it is, then do 3 things:
1) send the sender a message stating that in the future they need to
send their 'authorize' request to a different address (erosters in
2) forward their 'authorize' request to erosters, keeping both the
Subject: and body 100% intact, and making sure that the From_ header
shows their address and the To: header is addressed to erosters
(this .procmailrc is for an account named egrades, which runs
a similar, but different program).
3) finally, log the transactions in a special log file.
I'm only having problems with step #2. My tests with formail didn't
produce the needed results, but I am sure I'm just using the correct args
for the 2nd recipe [if it was formail-based]. Using v3.10 1994/10/31
Any tips appreciated!
# the below recipe is in both 'egrades' and 'erosters' .procmailrc
| formail -I "From " -a "From "
# first nested recipe forwards message to user giving him/her a clue
# where to send future authorize requests - to erosters, not egrades!
* !^X-Loop: $X_LOOP
| (formail -r -A"X-Loop: $X_LOOP" ; \
cat $HOME/authorize.txt) | $SENDMAIL -oi -t
# the following recipe needs to be modified so that
# the To: shows 'erosters' not 'egrades' but the
# body of the original message must be kept 100% intact!
# the From_ header stays the same [this does work, as
# the original sender's From_ is kept 100% intact]
# we're logging these requests in a different mailbox
# to keep track of who is sending requests to the
# wrong address
# let's make sure we're back to using the default log
# and now let's process egrades only requests via python
| (cd $HOME/MailBox; python-1.3 egrades_main.py )