procmail home : internet : mail : toaster : filtering : mail delivery : spam folder sample ham -vs- spam

How do users access their Spam folder?

The Spam folder is available using an IMAP client or one of the included webmail applications (Squirrelmail, Sqwebmail).

I enabled spam filtering in Qmailadmin. Where is the Spam folder?

It get's automatically created when the first spam message arrives. It is automatically subscribed to your IMAP folders.

How does a message end up in the Spam folder?

When you enable spam filtering in qmailadmin, what you actually do is change the way qmail delivers the mail to the user's inbox. With the spam filtering box unchecked in qmailadmin, the mail is placed directly in the user's maildir.

When you tick the spam filter box, a file (~vpopmail/domains/example.com/username/.qmail) is generated. This file gives instructions to the program delivering mail (vdelivermail). In (at least) the 3.3x and higher toasters, the mail is fed through maildrop. Maildrop takes its instructions from a script-ish file named /usr/local/etc/mail/mailfilter.

The current mailfilter file looks at the mail headers added by SpamAssassin to see if it's a spam or not (false positives notwithstanding), placing it in a folder called "~vpopmail/domains/example.com/username/.Spam" if it is. If the spam folder doesn't exist, maildrop creates it and subscribes the user to the folder so he/she can see it and manipulate it.

The mailfilter also checks quotas and some other stuff.


Last modified on 4/28/05.