procmail
[Top] [All Lists]

Rewriting messages as they pass through

2005-08-09 09:10:13
I have a little joke going at the moment, you have to email
bunny{at}rowyerboat{dot}com to see it.  My girlfriend likes this because
he's cute so she writes to him, but all he ever does is send the same reply
(go on, send him an email...).

I do it using this little recipe (addresses changed to stop sniffers):

:0 c
* ^X-Original-To:(_dot_)fred(_at_)mydomain\(_dot_)com
    | (formail -r \
        -I 'From: fred <fred(_at_)mydomain(_dot_)com>' ; \
        cat $HOME/fred.message) \
    | $SENDMAIL SENDMAILFLAGS -t

What I would like to be able to do is reply to her using fred's real
address.  The way I thought of doing it was like this:

I send a message to fred-reply(_at_)mydomain(_dot_)com, and the message looks
something like this:

From: wherever I sent it from
To: fred-reply(_at_)mydomain(_dot_)com
Subject: whatever I want it to be

...with the first line of the message body being the address I REALLY want
to send it to.

The recipe would then need to:

set the From: header to fred <fred(_at_)mydomain(_dot_)com>
set the To: header to the address contained within the first line of the
message
delete the first line of the message
send the message


Any ideas how I would attempt to do this?

Many thanks,
Steve :)

--
Stephen Allen
Technical Support Specialist (Global), Sophos

Tel: 01235 559933
Web: www.sophos.com
Protecting business against viruses, spyware, spam and policy abuse


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Rewriting messages as they pass through, Stephen Allen <=