Re: Email header parser?
On Sat, Apr 13, 2002 at 10:09:20AM +0300, Jarno Elonen wrote:
> I'm building a set of scripts to archive email messages in a custom way.
> Do you know of any better shell tools for extracting from, cc, subject etc.
> >from the headers than procmail/formail?
look at http://cr.yp.to/mess822.html
> formail but would generate a shell script snippet that, when evaluated, sets
> environment variables like $FROMNAME, $FROMADDRESS, $SUBJECT, $REPLYTO etc.
I think you'll have to script around to get it
suppose the messages is in "mess":
FROMADDRESS=$(822field from < mess)
SUBJECT=$(822field < mess)
REPLYTO=$(822field reply-to < mess)
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com