Blame contrib/mailfilter.example

Packit e8bc57
# mailfilter.example
Packit e8bc57
#
Packit e8bc57
# This is a sample maildrop configuration file which shows some ways
Packit e8bc57
# of running bogofilter from maildrop.
Packit e8bc57
Packit e8bc57
### bogofilter - filter & update word lists
Packit e8bc57
Packit e8bc57
MAILDIR=/var/spool/mail
Packit e8bc57
BOGOFILTER_DIR=/var/spool/bogofilter
Packit e8bc57
Packit e8bc57
#### backup ####
Packit e8bc57
cc "mail.backup"
Packit e8bc57
####
Packit e8bc57
Packit e8bc57
## Silently drop all completely unreadable mail into separate folder
Packit e8bc57
if (/^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)/)
Packit e8bc57
to "spam-unreadable"
Packit e8bc57
####
Packit e8bc57
Packit e8bc57
Packit e8bc57
#### bogofilter passthrough-update ####
Packit e8bc57
Packit e8bc57
xfilter 'bogofilter -p -u -l -e -v'
Packit e8bc57
Packit e8bc57
# if spam, file this into the "spam-bogofilter" folder and exit
Packit e8bc57
# processing
Packit e8bc57
if (/^X-Bogosity: (Spam|Yes)/)
Packit e8bc57
to "spam-bogofilter"
Packit e8bc57
Packit e8bc57
# if unsure, copy this into the "spam-bogofilter" folder and
Packit e8bc57
# CONTINUE processing
Packit e8bc57
if (/^X-Bogosity: Unsure/)
Packit e8bc57
cc "unsure-bogofilter"
Packit e8bc57
#### end bogofilter passthrough-update ####
Packit e8bc57
Packit e8bc57
Packit e8bc57
#### SpamAssassin ####
Packit e8bc57
# if spamassassin detects spam (this example assumes spamd is running),
Packit e8bc57
# teach bogofilter about it (avoiding to register spamassassin markup)
Packit e8bc57
# and store it to spam-spamassassin
Packit e8bc57
xfilter "/usr/bin/spamc"
Packit e8bc57
if (/^X-Spam-Status: YES/)
Packit e8bc57
{
Packit e8bc57
    cc "|/usr/bin/spamassassin -d -L|bogofilter -s"
Packit e8bc57
    to "spam-spamassassin"
Packit e8bc57
}
Packit e8bc57
#### end SpamAssassin ####