Vedere man maildropex
.
#------------------------------------------------------------------------- # $HOME/.mailfilter # # regex flags, used after the regex: /something/:b # :h - header # :b - body # :D - distinguish between upper and lower case (default is to ignore case) #------------------------------------------------------------------------- # Configure for mbox, maildir, or mh TYPE="maildir" DEFAULT="$HOME/Maildir" # Execute xfilter using this shell. # Wrap commands into exception{} to deal with errors. SHELL="/bin/sh" MAILDIRMAKE="/usr/bin/maildirmake" # Enable mail tracing. #logfile "$HOME/mailfilter.log" #------------------------------------------------------------------------- # 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" } } #------------------------------------------------------------------------- # 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" } }