1# mailfilter.example 2# 3# This is a sample maildrop configuration file which shows some ways 4# of running bogofilter from maildrop. 5 6### bogofilter - filter & update word lists 7 8MAILDIR=/var/spool/mail 9BOGOFILTER_DIR=/var/spool/bogofilter 10 11#### backup #### 12cc "mail.backup" 13#### 14 15## Silently drop all completely unreadable mail into separate folder 16if (/^Subject:.*=\?(.*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|windows-1251|windows-1256)\?/ || /^Content-Type:.*charset="(.*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987|windows-1251|windows-1256)/) 17to "spam-unreadable" 18#### 19 20 21#### bogofilter passthrough-update #### 22 23xfilter 'bogofilter -p -u -l -e -v' 24 25# if spam, file this into the "spam-bogofilter" folder and exit 26# processing 27if (/^X-Bogosity: (Spam|Yes)/) 28to "spam-bogofilter" 29 30# if unsure, copy this into the "spam-bogofilter" folder and 31# CONTINUE processing 32if (/^X-Bogosity: Unsure/) 33cc "unsure-bogofilter" 34#### end bogofilter passthrough-update #### 35 36 37#### SpamAssassin #### 38# if spamassassin detects spam (this example assumes spamd is running), 39# teach bogofilter about it (avoiding to register spamassassin markup) 40# and store it to spam-spamassassin 41xfilter "/usr/bin/spamc" 42if (/^X-Spam-Status: YES/) 43{ 44 cc "|/usr/bin/spamassassin -d -L|bogofilter -s" 45 to "spam-spamassassin" 46} 47#### end SpamAssassin #### 48