procmail
[Top] [All Lists]

Re: extracting mail body (help)

1997-02-24 02:16:50
"Scott" == Scott Theraux <scott(_at_)isnhp6(_dot_)in2p3(_dot_)fr> writes:

Scott> i.e. a mail with subject : <keyword> <key number>
Scott> gets saved to text file foo.<key number>.txt

# There's a space and a tab between the first [ ]'s below
:0c
* ^Subject:.*keyword[   ]\/[0-9]+
{
FOLDER=foo.$MATCH.txt 

# This will overwrite the previous contents
# If you are sure two mails can't arrive at the same time, you
# can remove the lockfile.
:0: $FOLDER.lock
| cat - >$FOLDER

}

I haven't tried it myself. (Ab)use at your own risk.


-- 
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>
Home Page: http://www.elis.rug.ac.be/~ggeens
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

<Prev in Thread] Current Thread [Next in Thread>