User Tools

Site Tools


doc:appunti:prog:esempi_maildrop

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:prog:esempi_maildrop [2014/02/18 11:03] niccolodoc:appunti:prog:esempi_maildrop [2014/02/18 13:09] (current) niccolo
Line 4: Line 4:
  
 <file> <file>
 +#-------------------------------------------------------------------------
 +# $HOME/.mailfilter
 +#
 # regex flags, used after the regex: /something/:b # regex flags, used after the regex: /something/:b
 # :h - header # :h - header
 # :b - body # :b - body
 # :D - distinguish between upper and lower case (default is to ignore case) # :D - distinguish between upper and lower case (default is to ignore case)
 +#-------------------------------------------------------------------------
  
-MAILDIRMAKE="/usr/bin/maildirmake" +Configure for mbox, maildir, or mh
- +
-configure for mbox, maildir, or mh+
 TYPE="maildir" TYPE="maildir"
- 
-logfile "$HOME/mailfilter.log" 
  
 DEFAULT="$HOME/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"
  
 #------------------------------------------------------------------------- #-------------------------------------------------------------------------
Line 29: Line 38:
 # spamc automatically skip messages greater than 512000 bytes. # spamc automatically skip messages greater than 512000 bytes.
 #------------------------------------------------------------------------- #-------------------------------------------------------------------------
-if ( $SIZE < 256000 )+if ($SIZE < 256000)
 { {
     exception {     exception {
Line 39: Line 48:
 # Blackhole or move into subfolder messages tagged as SPAM. # Blackhole or move into subfolder messages tagged as SPAM.
 #------------------------------------------------------------------------- #-------------------------------------------------------------------------
-if ( /^X-Spam-Flag: *YES/ )+if (/^X-Spam-Flag: *YES/)
 { {
     exception {     exception {
-        #to "/dev/null"+        to "/dev/null"
         # Create Spam subfolder (little overhead if it exists).         # Create Spam subfolder (little overhead if it exists).
         #`${MAILDIRMAKE} -f Spam "$DEFAULT"`         #`${MAILDIRMAKE} -f Spam "$DEFAULT"`
-        to "$HOME/Maildir/.Spam/"+        #to "$HOME/Maildir/.Spam"
     }     }
 } }
 </file> </file>
doc/appunti/prog/esempi_maildrop.1392717836.txt.gz · Last modified: 2014/02/18 11:03 by niccolo