procmail
[Top] [All Lists]

RE: whitelist matching (was: How do I get the message body ???)

2002-08-13 07:12:24
From: dman(_at_)nomotek(_dot_)com

      FROM=`formail -x From: | sed /^[^(_at_)]*$/&medphys.ucl.ac.uk/`

and be done with it.  Then the list-grepping recipe is, agian,
just

      :0:
      * $ ? grep -iw $FROM $HOME/white.list
      ok

and we're done.  Simple, wot?


One more refinement:

        :0
        ^From:[^(_at_)]+$
        { FROM=`formail -x From: | sed /^[^(_at_)]*$/&medphys.ucl.ac.uk/` }
        :0 E  # `E'lse
        { FROM=`formail -x From:` }

        :0:
        * $ ? grep -iw $FROM $HOME/white.list
        ok

That runs sed only if it's local.

dman

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