Browse Source

improve maildrop configuration

Emmanuel Bouthenot 17 years ago
parent
commit
6d244e5b06
2 changed files with 31 additions and 95 deletions
  1. 24 84
      .mailfilter
  2. 7 11
      .muttng/conf/mailboxes

+ 24 - 84
.mailfilter

@@ -1,92 +1,44 @@
 # .Mailfilter - rules for maildrop
 
 MAILDIR="/home/manu/Mail/imap"
-
+MAILDIRMAKE="/usr/bin/maildirmake"
 VERBOSE=9
 
 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 ###############
-if (/^List-Id: <debian-hurd.lists.debian.org>$/)
+if (/^List-Id: <debian-hurd\.lists\.debian\.org>$/)
         to $MAILDIR/.my.ml.hurd.debian
-if (/^List-Id:.*<hurdfr.hurdfr.org>$/)
+if (/^List-Id:.*<hurdfr\.hurdfr\.org>$/)
         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 ###############
-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 ###############
-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/)
         to $MAILDIR/.sys.reports
 
@@ -96,18 +48,7 @@ if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
     to $MAILDIR/.friends.tbs.tiacfooting
 }
 
-########## PUB :-( ####################
-if (/^From:.*laredoute@fr.redoute.com/)
-{
-    to $MAILDIR/.Trash
-}
-
 ########### Spam ###############
-#xfilter "bogofilter -u -e -p"
-#if (/^X-Bogosity:.*Spam/ && !/^X-Bogosity:.*Ham/ && !/^X-Bogosity:.*Unsure/)
-#{
-#    to $MAILDIR/.Spam
-#}
 
 xfilter "spamc"
 if (/^X-Spam-Status: YES/)
@@ -116,9 +57,8 @@ if (/^X-Spam-Status: YES/)
 }
 
 if (!/^From:.*/)
-{
     to $MAILDIR/.Spam
-}
 
+########### INBOX ###############
 to $MAILDIR/
 

+ 7 - 11
.muttng/conf/mailboxes

@@ -14,7 +14,6 @@ mailboxes =Draft
 mailboxes =Sent
 mailboxes =Spam
 mailboxes =Trash
-mailboxes =Queue
 
 mailboxes =sys.dak
 mailboxes =sys.reports
@@ -23,6 +22,9 @@ mailboxes =sys.infos
 mailboxes =my.misc
 mailboxes =my.irc
 
+mailboxes =my.soft.weechat.ml.cvs
+mailboxes =my.soft.weechat.ml.dev
+
 mailboxes =my.soft.debian.misc
 mailboxes =my.soft.debian.asso
 mailboxes =my.soft.debian.bts
@@ -31,26 +33,21 @@ mailboxes =my.soft.debian.pkg.kio-apt
 mailboxes =my.soft.debian.pkg.kwin-style-knifty
 mailboxes =my.soft.debian.pkg.incron
 mailboxes =my.soft.debian.pkg.dudki
-mailboxes =my.soft.debian.pkg.konqburn
+#mailboxes =my.soft.debian.pkg.konqburn
 
-mailboxes =my.soft.weechat.ml.cvs
-mailboxes =my.soft.weechat.ml.devel
-mailboxes =my.soft.kde
+#mailboxes =my.soft.kde
 
 mailboxes =my.ml.asyd.sysadmin
 mailboxes =my.ml.asyd.shell
 mailboxes =my.ml.asyd.emacs
 
-mailboxes =my.ml.gulliver.gulliver
-
 mailboxes =my.ml.abul.asso
 mailboxes =my.ml.abul.tech
-mailboxes =my.ml.abul.party
 mailboxes =my.ml.abul.debutants
 mailboxes =my.ml.abul.blahblah
 mailboxes =my.ml.abul.annonces
-
-mailboxes =my.ml.lna.action
+mailboxes =my.ml.abul.party
+mailboxes =my.ml.abul.devel
 
 mailboxes =my.ml.debian.announce
 mailboxes =my.ml.debian.mentors
@@ -65,7 +62,6 @@ mailboxes =my.ml.debian.france.ml
 
 mailboxes =my.ml.hurd.debian
 mailboxes =my.ml.hurd.hurdfr
-#mailboxes =my.ml.hurd.l4
 
 mailboxes =computer.shop.ebay
 mailboxes =computer.paypal