> Brandon Mitchell writes: > > > 2) Is there a way to convert the following from my .procmailrc: > > :0: > > * .*(@mega.net|\ > > [EMAIL PROTECTED]|\ > > [EMAIL PROTECTED]|\ > > [EMAIL PROTECTED]|\ > > [EMAIL PROTECTED]|\ > > ... > > [EMAIL PROTECTED]) > > > > to search for one of these e-mail addresses in a file? The idea being I > > can get a list of spam addresses, append them to a file, and procmail does > > it's dirty job if the address is in the file. Otherwise, I'll get one > > long and dirty .procmailrc file.
I'd like to thank Joey for his help with procmail on LISC irc (irc.linpeople.org#Debian). You can find a good example at Lars Wirzenius' webpage. If you are interested please take a look at http://www.iki.fi/liw/mail-to-lasu.html. As to what I have done, I process mailing list, pull out e-mail from trusted addresses, and check the remaining mail for spam addresses and for strings commonly found in spam. After I get it to a final state, I was thinking of submitting it to the procmail maintianer for addition to the /usr/doc/procmail/examples directory. --- .procmailrc --- PMDIR=$HOME/.procmail # debian stuff from mailing list INCLUDERC=$PMDIR/rc.deb # White list is a list of personal friends, mail will go to inbox WHITELIST = $PMDIR/white.list WHITEBOX = $DEFAULT INCLUDERC=$PMDIR/rc.white # Black list contains a list of known spammers plus a scan through the # body for well known spam strings BLACKLIST = $PMDIR/black.list BLACKSTRING = $PMDIR/black.string BLACKTEXT = $PMDIR/black.text INCLUDERC=$PMDIR/rc.black --- rc.white --- :0 Whic | (formail -x from: -x sender: | grep -iqFf $WHITELIST) :0 a $WHITEBOX --- rc.black --- :0 Whic * !^X-Loop: [EMAIL PROTECTED] | (formail -x from: -x sender: | grep -iqFf $BLACKLIST) :0 a | (formail -rt -A"Precedence: junk" \ -A"X-Loop: [EMAIL PROTECTED]" ; \ cat $BLACKTEXT) | $SENDMAIL -t :0 Wic * !^X-Loop: [EMAIL PROTECTED] | grep -iqFf $BLACKSTRING :0 a | (formail -rt -A"Precedence: junk" \ -A"X-Loop: [EMAIL PROTECTED]" ; \ cat $BLACKTEXT) | $SENDMAIL -t --- white.list --- # list of trusted people [EMAIL PROTECTED] root@ postmaster@ --- black.list --- # list of known spammers and spam sites [EMAIL PROTECTED] [EMAIL PROTECTED] @cyberpromo.com --- black.string --- # strings commonly found in spam letters get rich quick $$$ Thanks again Joey and Lars, Brandon ----- Brandon Mitchell E-mail: [EMAIL PROTECTED] Homepage: http://www.geocities.com/SiliconValley/7877/home.html "We all know Linux is great...it does infinite loops in 5 seconds." --Linus Torvalds -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .