Auto Generate Passlists

December 29th, 2010

In the past, I have used this shell script to generate a passlist of trusted emails gathered from a user's "sent" Maildir.

SENTMAIL="/home/ Messages/cur/"
touch $SADIR/sent_whitelist
rm -f $SADIR/sent_whitelist
for x in `grep -r "^To:" "$SENTMAIL" |
        grep -o "[[:alnum:]\.\+\-\_]*@[[:alnum:]\.\-]*" |
        tr "A-Z" "a-z" |
        sort -u` ;
        do echo "whitelist_from $x" >> $SADIR/sent_whitelist
cat $SADIR/user_prefs.base $SADIR/sent_whitelist > $SADIR/user_prefs

Why did I do this? To save cycles by avoiding the overhead of spamassassin for trusted senders.

Not a bad idea, eh?

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022