Menu

#1 Conditional server-side sorting

open
nobody
None
5
2001-07-26
2001-07-26
No

I have installed mdropspamfilter/spammailfilter system-
wide as my /etc/maildroprc.

Most of my users download their mail and do any
filtering client-side, so tagging is sufficient.

Some of my users read their mail with IMAP, and want
the mail to be filtered into folders on the server.

Here is how I safely deliver X-Antispam tagged mail
into a "Spam" folder if it exists:

I've appended this to the end of the filter:

if (/^X-Antispam: /)
{
# If the "Spam" folder exists, save tagged
mail there. Otherwise bail.
exception {
to "./.Spam/."
}
# If the "spam" folder exists, save tagged
mail there. Otherwise bail.
exception {
to "./.spam/."
}
# If the "SPAM" folder exists, save tagged
mail there. Otherwise bail.
exception {
to "./.SPAM/."
}
}

You have to have a version of maildrop newer than
1.3.2 for this to work. There was a bug in exception
handling before that.

Discussion


Log in to post a comment.