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
doc:appunti:prog:esempi_maildrop [2014/02/18 11:13] 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 34: Line 43:
         xfilter "/usr/bin/spamc"         xfilter "/usr/bin/spamc"
     }     }
-} 
- 
-#------------------------------------------------------------------------- 
-# Move sender into a folder (beware of extra char in From header!). 
-#------------------------------------------------------------------------- 
-if (/^From: *Newsletter/) 
-{ 
-    to Maildir/.News 
 } }
  
Line 50: Line 51:
 { {
     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.1392718428.txt.gz · Last modified: 2014/02/18 11:13 by niccolo