procmail
[Top] [All Lists]

Re: formail to split digest with indented From and Date

2002-03-23 16:01:40
Anita wrote:


I belong to some yahoogroups lists and get a couple digests. 
I have this recipe:
:0
* ^Subject:.*Digest
* ^Subject:.*[Somename]
{
  :0 c
  somename

  :0
  | formail +1 -ds >> somename
}

To find "[Somename] Digest" in a yahoogroups-subject, 
you can use 
* ^subject:.*\[somename] digest

But yahoogroups-messages are much easier filtered by the To:/Cc: 
then by the Subject. 

Try to think along the lines of this:

:0
* TO_\/[a-z0-9_-]+(_at_)yahoogroups\(_dot_)com
{
  :0 c:
  * MATCH ?? ^\/[a-z0-9_-]+
  $MATCH

  :0 E:
  oops

  :0 w
  * ^Subject:.*Digest
  | formail +1 -ds >> $MATCH
}

That will handle all your yahoogroups-lists with a single recipe.

Maybe the -z option of formail can take care off the leading spaces 
on the Date and From lines. 

Ruud


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