doc:appunti:prog:esempi_maildrop
This is an old revision of the document!
Esempio regole maildrop
Vedere man maildropex.
# regex flags, used after the regex: /something/:b
# :h - header
# :b - body
# :D - distinguish between upper and lower case (default is to ignore case)
MAILDIRMAKE="/usr/bin/maildirmake"
# configure for mbox, maildir, or mh
TYPE="maildir"
logfile "$HOME/mailfilter.log"
DEFAULT="$HOME/Maildir"
#-------------------------------------------------------------------------
# Filter the mail with ClamAV
#-------------------------------------------------------------------------
exception {
xfilter "/usr/bin/sanitizer /etc/sanitizer.cfg"
}
#-------------------------------------------------------------------------
# Filter the mail with SpamAssassin
# spamc automatically skip messages greater than 512000 bytes.
#-------------------------------------------------------------------------
if ($SIZE < 256000)
{
exception {
xfilter "/usr/bin/spamc"
}
}
#-------------------------------------------------------------------------
# Move sender into a folder (beware of extra char in From header!).
#-------------------------------------------------------------------------
if (/^From: *Newsletter/)
{
to Maildir/.News
}
#-------------------------------------------------------------------------
# Blackhole or move into subfolder messages tagged as SPAM.
#-------------------------------------------------------------------------
if (/^X-Spam-Flag: *YES/)
{
exception {
#to "/dev/null"
# Create Spam subfolder (little overhead if it exists).
#`${MAILDIRMAKE} -f Spam "$DEFAULT"`
to "$HOME/Maildir/.Spam/"
}
}
doc/appunti/prog/esempi_maildrop.1392718428.txt.gz · Last modified: by niccolo
