|
@@ -1,6 +1,7 @@
|
|
|
# .Mailfilter - rules for maildrop
|
|
|
|
|
|
-MAILDIR="/home/manu/Mail/imap"
|
|
|
+HOME="/home/manu"
|
|
|
+MAILDIR="$HOME/Mail/imap"
|
|
|
MAILDIRMAKE="/usr/bin/maildirmake"
|
|
|
VERBOSE=9
|
|
|
|
|
@@ -10,7 +11,7 @@ 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.*$/)
|
|
|
+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.*$/)
|
|
@@ -25,6 +26,10 @@ 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
|
|
@@ -98,7 +103,23 @@ if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
|
|
|
|
|
|
### Spam
|
|
|
|
|
|
-xfilter "spamc"
|
|
|
+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
|