|
@@ -1,92 +1,44 @@
|
|
# .Mailfilter - rules for maildrop
|
|
# .Mailfilter - rules for maildrop
|
|
|
|
|
|
MAILDIR="/home/manu/Mail/imap"
|
|
MAILDIR="/home/manu/Mail/imap"
|
|
-
|
|
|
|
|
|
+MAILDIRMAKE="/usr/bin/maildirmake"
|
|
VERBOSE=9
|
|
VERBOSE=9
|
|
|
|
|
|
logfile "/home/manu/logs/maildrop/maildrop.log"
|
|
logfile "/home/manu/logs/maildrop/maildrop.log"
|
|
|
|
|
|
-########### debian lists ###############
|
|
|
|
-if (/^List-Id: <debian-user-french.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.user-french
|
|
|
|
-if (/^List-Id: <debian-devel-french.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.devel-french
|
|
|
|
-if (/^List-Id: <debian-devel.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.devel
|
|
|
|
-if (/^List-Id: <debian-security-announce.lists.debian.org>$/ || /^To:.*debian-security@lists.debian.org.*$/ || /^Cc:.*debian-security@lists.debian.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.security
|
|
|
|
-if (/^Cc:.*asso@france.debian.net.*$/ || /^To:.*asso@france.debian.net.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.france.asso
|
|
|
|
-if (/^Cc:.*sl@france.debian.net.*$/ || /^To:.*sl@france.debian.net.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.france.sl
|
|
|
|
-if (/^List-Id: <debian-devel-announce.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.devel-announce
|
|
|
|
-if (/^List-Id: <debian-mentors.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.mentors
|
|
|
|
-if (/^List-Id: <debian-announce.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.announce
|
|
|
|
-if (/^List-Id: <debian-devel-changes.lists.debian.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.debian.devel-changes
|
|
|
|
-
|
|
|
|
########### hurd lists ###############
|
|
########### hurd lists ###############
|
|
-if (/^List-Id: <debian-hurd.lists.debian.org>$/)
|
|
|
|
|
|
+if (/^List-Id: <debian-hurd\.lists\.debian\.org>$/)
|
|
to $MAILDIR/.my.ml.hurd.debian
|
|
to $MAILDIR/.my.ml.hurd.debian
|
|
-if (/^List-Id:.*<hurdfr.hurdfr.org>$/)
|
|
|
|
|
|
+if (/^List-Id:.*<hurdfr\.hurdfr\.org>$/)
|
|
to $MAILDIR/.my.ml.hurd.hurdfr
|
|
to $MAILDIR/.my.ml.hurd.hurdfr
|
|
-if (/^List-Id:.*<l4-hurd.gnu.org>$/)
|
|
|
|
- to $MAILDIR/.my.ml.hurd.l4
|
|
|
|
|
|
|
|
-########### asyd lists ###############
|
|
|
|
-if (/^List-Id:.*<sysadmin.asyd.net>.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.asyd.sysadmin
|
|
|
|
|
|
+########### debian lists ###############
|
|
|
|
+if (/^List-Id: <debian-!.*!\.lists\.debian\.org>.*$/)
|
|
|
|
+{
|
|
|
|
+ exception {
|
|
|
|
+ `test -d $MAILDIR/.my.ml.debian.$MATCH2`
|
|
|
|
+ if( $RETURNCODE == 1 )
|
|
|
|
+ `$MAILDIRMAKE $MAILDIR/.my.ml.debian.$MATCH2`
|
|
|
|
+ to $MAILDIR/.my.ml.debian.$MATCH2
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
-if (/^List-Id:.*<shell.asyd.net>.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.asyd.shell
|
|
|
|
|
|
+if (/^List-Id: <!.*!\.france\.debian\.net>.*$/)
|
|
|
|
+ to $MAILDIR/.my.ml.debian.france.$MATCH2
|
|
|
|
|
|
-if (/^List-Id:.*<emacs.asyd.net>.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.asyd.emacs
|
|
|
|
|
|
+########### asyd lists ###############
|
|
|
|
+if (/^List-Id:.*<!.*!\.asyd\.net>.*$/)
|
|
|
|
+ to $MAILDIR/.my.ml.asyd.$MATCH2
|
|
|
|
|
|
########### abul lists ###############
|
|
########### abul lists ###############
|
|
-if (/^List-Id: <asso.abul.org>$/ || /^To:.*asso@abul.org.*$/ || /^Cc:.*asso@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.asso
|
|
|
|
-
|
|
|
|
-if (/^List-Id: <tech.abul.org>$/ || /^To:.*tech@abul.org.*$/ || /^Cc:.*tech@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.tech
|
|
|
|
-
|
|
|
|
-if (/^List-Id: <devel.abul.org>$/ || /^To:.*devel@abul.org.*$/ || /^Cc:.*devel@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.devel
|
|
|
|
-
|
|
|
|
-if (/^List-Id: <debutants.abul.org>$/ || /^To:.*debutants@abul.org.*$/ || /^Cc:.*debutants@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.debutants
|
|
|
|
-
|
|
|
|
-if (/^List-Id: <party.abul.org>$/ || /^To:.*party@abul.org.*$/ || /^Cc:.*party@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.party
|
|
|
|
-
|
|
|
|
-if (/^List-Id: <annonces.abul.org>$/ || /^To:.*annonces@abul.org.*$/ || /^Cc:.*annonces@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.annonces
|
|
|
|
-
|
|
|
|
-if (/^List-Id: <blahblah.abul.org>$/ || /^To:.*blahblah@abul.org.*$/ || /^Cc:.*blahblah@abul.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.abul.blahblah
|
|
|
|
-
|
|
|
|
-########### lna lists ###############
|
|
|
|
-if (/^X-Original-To: linuxaction@tux.linux-nantes.fr.eu.org$/ || /^To:.*linuxaction@linux-nantes.org.*$/ || /^Cc:.*linuxaction@linux-nantes.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.lna.action
|
|
|
|
-
|
|
|
|
-########### gulliver lists ###############
|
|
|
|
-if (/^List-Id:.*gulliver@listes.linux-france.org.*$/ || /^List-Id:.*gulliver.listes.linux-france.org.*$/)
|
|
|
|
- to $MAILDIR/.my.ml.gulliver.gulliver
|
|
|
|
|
|
+if (/^List-Id:.*<!.*!.abul.org>;*$/)
|
|
|
|
+ to $MAILDIR/.my.ml.abul.$MATCH2
|
|
|
|
|
|
########### WeeChat lists ###############
|
|
########### WeeChat lists ###############
|
|
-if (/^List-Id: weechat-cvs.nongnu.org$/)
|
|
|
|
- to $MAILDIR/.my.soft.weechat.ml.cvs
|
|
|
|
-if (/^List-Id: weechat-dev.nongnu.org$/ || /^To:.*weechat-dev@nongnu.org/)
|
|
|
|
- to $MAILDIR/.my.soft.weechat.ml.devel
|
|
|
|
-
|
|
|
|
-########### Kde Devel ###############
|
|
|
|
-if (/^From:.*kde.org$/)
|
|
|
|
- to $MAILDIR/.my.soft.kde
|
|
|
|
|
|
+if (/^List-Id:.*weechat-!.*!.nongnu.org.*$/)
|
|
|
|
+ to $MAILDIR/.my.soft.weechat.ml.$MATCH2
|
|
|
|
|
|
-########### Misc Stuff ###############
|
|
|
|
|
|
+########### Logs Stuff ###############
|
|
if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
|
|
if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
|
|
to $MAILDIR/.sys.reports
|
|
to $MAILDIR/.sys.reports
|
|
|
|
|
|
@@ -96,18 +48,7 @@ if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
|
|
to $MAILDIR/.friends.tbs.tiacfooting
|
|
to $MAILDIR/.friends.tbs.tiacfooting
|
|
}
|
|
}
|
|
|
|
|
|
-########## PUB :-( ####################
|
|
|
|
-if (/^From:.*laredoute@fr.redoute.com/)
|
|
|
|
-{
|
|
|
|
- to $MAILDIR/.Trash
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
########### Spam ###############
|
|
########### Spam ###############
|
|
-#xfilter "bogofilter -u -e -p"
|
|
|
|
-#if (/^X-Bogosity:.*Spam/ && !/^X-Bogosity:.*Ham/ && !/^X-Bogosity:.*Unsure/)
|
|
|
|
-#{
|
|
|
|
-# to $MAILDIR/.Spam
|
|
|
|
-#}
|
|
|
|
|
|
|
|
xfilter "spamc"
|
|
xfilter "spamc"
|
|
if (/^X-Spam-Status: YES/)
|
|
if (/^X-Spam-Status: YES/)
|
|
@@ -116,9 +57,8 @@ if (/^X-Spam-Status: YES/)
|
|
}
|
|
}
|
|
|
|
|
|
if (!/^From:.*/)
|
|
if (!/^From:.*/)
|
|
-{
|
|
|
|
to $MAILDIR/.Spam
|
|
to $MAILDIR/.Spam
|
|
-}
|
|
|
|
|
|
|
|
|
|
+########### INBOX ###############
|
|
to $MAILDIR/
|
|
to $MAILDIR/
|
|
|
|
|