procmail
[Top] [All Lists]

Re: formail to split digest with indented From and Date

2002-03-23 20:19:37
On Sat, Mar 23, 2002 at 06:54:48PM -0500, Ruud H.G. van Tol wrote:

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

I tried the -z option.  First I tried it as -dsz.  That left the digest not
split at all.  Putting it in the middle -dzs allowed the split, but did not
get rid of the lead space.  

I am very interested in doing the bit with matching and putting the digest
in a folder by the same name.  I tried just copying it into my rc.maillists,
but it caused it to just copy the intact digest as it went down to a later
recipe that I had previously when I got individual mails.  I don't know
enough about this type of expressions to tell what might be wrong.  It would
be a handy thing to use with other recipes that I have as well, if I could
understand it and get it done correctly.  Thank you very much for sharing it
with me.  I'll try to find some info on regex so that I can understand it
and maybe use it later.  For now at least, I have the thing working.  If you
see a typo or something in the recipe let me know.  Thanks a bunch for the
help.

Anita

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