Sam Varshavchik wrote:
Run maildrop with the -V9 flag.
Thanks, Sam. But I solved the problem before I read your message, by
adding "$MAILDIR/" to each expression in the "to" statements.
I also discovered that I had added an extraneous "=" to the logfile
instruction, writing it as:
logfile="$HOME/.mailfilter.log"
which produced a syntax error. And I had failed to escape the square
brackets ("[" and "]") in some of the patterns.
%%%%%
I still need to run again one experiment. In attempting to sort on the
"To:" and "From:" headers from multiple addresses, the first
construction below appeared to give trouble:
if ( ( /^(To||From):.*(red||green||blue) )
to $MAILDIR/colour
while the second was successful:
if ( ( /^(To||From):.*red/ ) \
|| ( /^(To||From):.*green/ ) \
|| ( /^(To||From):.*blue/ ) \
|| ( /^(To||From):.*yellow/ ) \
)
to $MAILDIR/colour
%%%%%
Following is the "~/.mailfilter" file which I now am running and which
appears to work correctly. Note that I am using maildir structures,
which maildrop recognizes automatically (by the fact that the
destinations are directories):
MAILDIR="$HOME/mail"
DEFAULT="$HOME/mail/nondescript"
logfile "$HOME/.mailfilter.log"
if ( /^Subject:.*SPAM/ )
to $MAILDIR/spam
if ( /^(To||Cc):.*debian-user/ )
to $MAILDIR/computer/debian
if ( /^(To||Cc):.*mutt-users/ )
to $MAILDIR/computer/mutt
if ( /^Subject:.*\[alsa-user\]/ )
to $MAILDIR/computer/alsa
to $MAILDIR/nondescript
RLH