procmail
[Top] [All Lists]

Re: whitelists based on domain only

2003-12-04 15:24:54
Where can I find more documentation for $MATCH and INCLUDERC?


At 00:46 +0100 11/20/2003, Ruud H.G. van Tol wrote:
Maybe you can use this:

First, create a file $RCDIR/GREEN_DOMAINS.rc that looks like this:

 GREEN_DOMAINS="
tidbits.com
worldsmith.org
yahoogroups.com
nasa.gov
bbc.co.uk
"

Second, put these lines in your .procmailrc

 INCLUDERC=$RCDIR/GREEN_DOMAINS.rc
 :0
 * ^From [^(_at_)]@\/[^ ]+
 {
   From_Domain = $MATCH   # example: tv.bbc.co.uk

   :0   # try: co.uk
   * From_Domain ?? \/[^.]+\.[^.]+^^
   *$ GREEN_DOMAINS ?? $MATCH^
   $DEFAULT

   :0   # try: bbc.co.uk
   * From_Domain ?? \/[^.]+\.[^.]+\.[^.]+^^
   *$ GREEN_DOMAINS ?? $MATCH^
   $DEFAULT
 }

-- 
- Vicki

Vicki Brown      ZZZ                Journeyman Sourceror:
P.O. Box 1269       zz  |\     _,,,---,,_      Scripts & Philtres
San Bruno, CA 94066  zz /,`.-'`'    -.  ;-;;,_     Perl, Unix, MacOS
http://www.cfcl.com    |,4-  ) )-,_. ,\ ( `'-' http://www.cfcl.com/vlb
____________________  '---''(_/--'  `-'\_)  ____________________________


_______________________________________________
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>