# Please check if all the paths in PATH are reachable, remove the ones that # are not. #PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:. #MAILDIR=$HOME/Maildir/ # You'd better make sure it exists #DEFAULT=new LOGFILE=$HOME/logs/proclog #LOCKFILE=$HOME/.lockmail VERBOSE = "off" MAILDIR=$HOME/Maildir/ DEFAULT=${MAILDIR} LOGFILE=$HOME/logs/proclog # where to send spam SPAMNUMBER="" SPAMNUMBER2="" SPAMLEVEL="" # do not add (bla) NOADD="0" #Processing of mailing lists # nihil goes to nihil :0w * ^To.*nihil@poelzi.org(.*) /dev/null :0fw | /usr/bin/spamassassin # extract the original subject (this also eliminates leading whitespace) :0 * ^Subject: \/[^ ].* { SUBJECT=$MATCH } :0 * ^X-Spam-Level: \/[^ ].* { SPAMLEVEL=$MATCH } :0 * ^X-Spam-Flag: YES.* { SPAMNUMBER=`echo $SPAMLEVEL | sed "s/\([0-9]*\.[0-9]*\).*/\\1/"` SPAMNUMBER2=`/usr/bin/printf "%04.1f" $SPAMNUMBER` } ADD="poelzi" MLIST="NONE" MLISTF="NONE" # test for mailinglist DATE=`formail -xDate:` NDATE=`~/bin/testdate.py $DATE` :0fwhi * ! DATE ?? NDATE | formail -i"Date: ${NDATE}" # rest go into Junk folder :0 * ^X-Spam-Flag: YES.* { #:0hfw #| formail -I "Subject: $SPAMNUMBER2 $SUBJECT" # delete spam with more than 9.9 points #:0c #!poelzi.org@gmail.com :0w * ^X-Spam-Level:.*\*\*\*\*\*\*\*\*\*.* /dev/null :0 .Junk/ } # MAILMAN REMINDERS # to quote young Jeffrey: # "I'm so completely not interested in receiving these at # the end of every month" :0w * ^From: .*mailman-owner@ * ^Subject: .* mailing list memberships reminder /dev/null # onelist/egroups/yahoogroups/whatever_they're_called_today # lists with their non-standard header format, and ad nuker :0 * ^Mailing-List: list \/[^@]+ { MLIST="$MATCH" :0 fbw | sed '/-\~-->$/,/--\~->$/d' } # use X-Mailing-List: first, because some ML send false infos with the # Mailing-List clause :0 E * 1^0 ^(List-Id|(X-)?Mailing-List|X-List):\/.* * 1^0 ^X-Mailing-List:\/.* { MLISTF="$MATCH" LOG="FIRST $MATCH | " :0 * $MLISTF ?? ^.*[<]\/[^@>\.]* { MLIST="$MATCH" } #LOG="SECOUND $MLIST | " # list django-users@googlegroups.com; #:0 e #* $MLISTF ?? ^(list )\/[^@>\.]* #{ # MLIST=$MATCH #} #LOG="THIRD $MLISTF | " :0 E * $MLISTF ?? ^\/[^@\.]* { LOG="JO" MLIST="$MATCH" } # remove whitespaces :0 * $MLIST ?? ^[ ]*\/[^ ]+ { MLIST=$MATCH } #LOG="ML $MLIST |" #:0 #LOG="MLIST $MLIST | $MLISTF | $MATCH" #MLISTF=$MATCH #MLIST=`echo $MATCH | sed s/\..*//` #MLISTSRV=`echo $LISTID | sed s/.*\.//` #BLA=`echo '$MATCH | $MLIST | $MLISTSRV' >> /tmp/listtest` } #LOG="MLIST '$MLIST' | $MLISTF" # test if mlist should be skipped :0Wi * 1^0 ? grep '$MLIST' ~/.noautomlist { MLIST="NONE" } :0 * ! MLIST ?? "NONE" { NOADD="1" :0i * ? test -d ~/Maildir/.mlist.$MLIST .mlist.$MLIST/ :0 ./ } #:0 #* X-BeenThere: \/.* #{ # MLIST=`echo $MATCH | sed s/@.*//` #} # over spamassassaisin DROPPRIVS=yes :0 * ^From.(.*)dwn\@ideenreich.com(.*) .newsletter.dr-web/ :0 * ^Subject.*\[PHP Classes\].* .newsletter.php-classes/ #:0: #* ^From.(.*)MAILER-DAEMON(.*) #.root.postmaster/ :0 * ^Envelope-to: postmaster .root.postmaster/ :0 * ^To.*root(.*) * ^Subject.*cron(.*) .root.cron/ # # insert it into the headers :0hfw * ^X-BeenThere.*public@cccs.de.* * ! SUBJECT ?? .*\[CCCS\].* | formail -I "Subject: [CCCS] $SUBJECT" #:0hfw #* MLISTSRV ?? "googlegroups.com" #* ! SUBJECT ?? .*\[$MLIST\].* #| formail -I "Subject: [$MLIST] $SUBJECT" # mails not for me # change subject :0 * ^Envelope-to: \/.*poelzi.org.* { ADD=`echo $MATCH | sed "s/\(.*\)@poelzi.org/\1/"` } :0 * ^FROM_MAILER * ! ADD ?? ^poelzi$ { :0 * 1^0 Return-path: <> #* 1^0 Subject: .*deliver.* #* 1^0 Subject: .*return.* * 1^0 ^subject: (undeliverable|undelivered|returned)? ?(mail|message)(:? (returned to (mail|send)er|user unknown))? .Junk.Mailer/ } :0hfw * ! ADD ?? ^poelzi$ * NOADD ?? "0" | formail -I "Subject: ($ADD) $SUBJECT"