Shane Chrisp wrote:
On Mon, 2008-09-29 at 12:16 -0400, Jason S wrote:

right. If you enable spam-hits, then passthru is disabled.

--enable-spam-passthru=y|n
    This option turns spam passthru on and off.  When enabled, email
identified as spam via the X-Spam-Status: header will be passed on to the user instead of rejected.
Note : *Enabling spam-hits effectively disables this option*

I have played around with these options too and I would use it, but I
cant seem to work out how to reject mail to users who dont want it
passed through to them. Do you do that, or do you just pass all mail
through to the users maildir or delete it?


I pass it all through to the user's spam folder. that is just how it works best for my setup.

if you want selective treatment of spam (using the pass-through method), you can create a .qmail file in the user's Maildir (or use the valias table in mysql) and use Maildrop to drop the spam into the .Spam folder (or just delete it).

for example...

contents of user's .qmail file:

|/usr/bin/preline /usr/local/bin/maildrop /home/vpopmail/.mailfilter


contents of .mailfilter (to delete messages marked as spam):

if (/^X-Spam-Flag: *YES/)
{
        exception {
                  exit
        }
}
else
{
        exception {
                to "Maildir/"
        }
}
exit


contents of .mailfilter (to move spam to .Spam folder):

if (/^X-Spam-Flag: *YES/)
{
        exception {
                  to "Maildir/.Spam/"
        }

        # if no spam folder, default to Inbox
        exception {
                to "Maildir/"
        }
}
else
{
        exception {
                to "Maildir/"
        }
}

exit


this can be tweaked and some error checking added in as well.

Reply via email to