procmail
[Top] [All Lists]

Re: Having problems using $match

2001-09-03 16:47:10
Matt Dunford <zoot(_at_)zotikos(_dot_)com> writes:
...
Here's a good book on regex -- not necessarily for beginners though.
But I'd give it a try anyway.  It has plenty of examples.

 - http://www.oreilly.com/catalog/regex/ -  

I think Jeffrey's book is for *everyone*.  Heck, *I* have a copy and I
even dream in regexp...


One correction, however:

...
I think this is what you want to do:

:0
* ^Subject: *failure notice
* B ?? To: \/[-_(_dot_)+a-z0-9]+(_at_)[-_(_dot_)+a-z0-9]+
| echo $MATCH >> $HOME/somefile

Because the action doesn't do anything with the message, as fed to
it by procmail, the recipe needs the 'i' flag to tell procmail not to
treat it as an error that the action doesn't read in the entire message.
You Probably also want a locallockfile to protect 'somefile' from being
simultaneously written to by multiple processes.  So:

        :0 i:
        * ^Subject: *failure notice
...etc


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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