# .Mailfilter - rules for maildrop HOME="/home/manu" MAILDIR="$HOME/Mail/imap" MAILDIRMAKE="/usr/bin/maildirmake" VERBOSE=9 MAILDROP_OLD_REGEXP=1 logfile "/home/manu/Admin/logs/maildrop/maildrop.log" ## Listes RMLL 2008 if (/^To:.*organisation@rmll2008\.org.*$/ || /^Cc:.*organisation@rmll2008\.org.*$/ || /^X-BeenThere:.*2008@rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.2008 #if (/^List-Id:.*![^ <]+!\.rmll\.info.*$/) # to $MAILDIR/.my.ml.rmll.$MATCH2 if (/^List-Id:.*2008\.rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.2008 if (/^List-Id:.*org\.rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.org if (/^List-Id:.*themes\.rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.themes if (/^List-Id:.*communication\.rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.communication if (/^List-Id:.*partenaires\.rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.partenaires if (/^List-Id:.*participants\.rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.participants if (/^From:.*reservation@rmll\.info.*$/) to $MAILDIR/.my.ml.rmll.resa ## Debian backports if (/^List-Id:.*$/) to $MAILDIR/.my.ml.debian.backports ### Debian Lists if (/^List-Id: .*$/) { exception { `test -d $MAILDIR/.my.ml.debian.$MATCH2` if( $RETURNCODE == 1 ) `$MAILDIRMAKE $MAILDIR/.my.ml.debian.$MATCH2` to $MAILDIR/.my.ml.debian.$MATCH2 } } ### Debian France Lists if (/^List-Id: .*$/) to $MAILDIR/.my.ml.debian.france.$MATCH2 ### Debian Alioth Projects if (/^List-Id: .*.*$/) to $MAILDIR/.my.soft.debian.pkg.phototools ### Hurd France Lists if (/^List-Id:.*$/) to $MAILDIR/.my.ml.hurd.hurdfr ### Asyd Lists if (/^List-Id:.*mailman\.asyd\.net>.*$/) to $MAILDIR/ if (/^List-Id:.*.*$/) to $MAILDIR/.my.ml.asyd.$MATCH2 ### Galette Lists if (/^List-Id:.*.*$/) to $MAILDIR/.my.soft.galette.$MATCH2 ### Abul Lists if (/^List-Id:.*.*$/) { exception { `test -d $MAILDIR/.my.ml.abul.$MATCH2` if( $RETURNCODE == 1 ) `$MAILDIRMAKE $MAILDIR/.my.ml.abul.$MATCH2` to $MAILDIR/.my.ml.abul.$MATCH2 } } ### WeeChat Lists if (/^List-Id:.*weechat-!.*!\.nongnu\.org.*$/ || /^To:.*weechat-!.*!\.nongnu.org\.*$/) to $MAILDIR/.my.soft.weechat.ml.$MATCH2 ### Sympa Stuff if (/^From:.*SYMPA/) { to $MAILDIR/.sys.sympa } ### Logs Stuff if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/) to $MAILDIR/.sys.reports ### Tiac Info if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/) { to $MAILDIR/.friends.tbs.tiacfooting } ### Spam CRMSCORE=`grep -a -v "^X-CRM114" | crm -u $HOME/.crm/ /usr/share/crm114/mailfilter.crm --stats_only` xfilter "formail -I \"X-CRM114-Score: $CRMSCORE\"" if ($CRMSCORE < -1) { xfilter "formail -I \"X-CRM114-Spam: yes\"" } log "Spam: $CRMSCORE" #if (/^X-CRM114-Spam: yes/) #{ # to $MAILDIR/.Spam #} #xfilter "spamc" if (/^X-Spam-Status: YES/) { to $MAILDIR/.Spam } #if (!/^From:.*/ || /^Subject:.*[??SPAM??].*/) # to $MAILDIR/.Spam ########### INBOX ############### to $MAILDIR/