Thanks to Charlie Watt's example maildroprc, I was able to come up with a
way to configure vpopmail to use maildrop, and have maildrop scan the
message, and if it's tagged as possible Spam, deliver it to a SPAM folder in
the users Maildir, which can be read via sqwebmail or courier-imap.

So, what I know have is a way for virtual users in virtual domains under
vpopmail to have their own personalized spam settings, *and* keep a vast
majority of the spam out of the users mailboxes (most are pop users) while
not throwing away any mail.  Now, if I can just work up an easy way for a
user looking at the SPAM folder in sqwebmail to add an address to their
white list :)

I didn't use a sitewide maildroprc file like Charlie did, 'cause I'm still
getting a handle on vpopmail + maildrop + SpamAssassin, and I've also got
users that actually have an account on the box.  However, I am going to play
with having a quasi-global version of this, probably in ~vopmail.  It should
work, and it'll make admin programming a little simpler :)

So, here it is....

~vpopmail/domains/domain/.qmail-default
=======================================

|/usr/local/bin/maildrop .mailfilter


~vpopmail/domains/domain/.mailfilter
====================================

#######################################################################
# Mailfilter rules created by Dave Weiner <[EMAIL PROTECTED]>     #
# to integrate SpamAssassin with vpopmail using maildrop.  Note:      #
# vpopmail may need the seekable patch applied for this to work.      #
# I did not test this on a non-patched version of vpopmail.           #
#                                                                     #
# These rules have no warranty other than they worked for me :)       #
#######################################################################

#######################################################################
# We need these environment variables from qmail                      #
#######################################################################

import HOME
import EXT
import HOST

if ( $SIZE < 262144 )
{
#######################################################################
# Only scan messages less than 256KB in size                          #
#                                                                     #
# Thanks to Charlie Watts <[EMAIL PROTECTED]> for suggesting this  #
# in his post of his maildroprc file to the spamassassin-talk mailing #
# list                                                                #
#######################################################################
        exception {
#######################################################################
# If spamd dies, go ahead and deliver anyway.  Belt and suspender for #
# the -f flag on spamc.  Thanks again to Charlie Watts :)             #
#######################################################################
                xfilter "/usr/bin/spamc -f -u $EXT@$HOST"
        }
}
if (/^X-Spam-Flag: *YES/)
{
#######################################################################
# If the X-Spam-Flag is set, dump it into a Maildir folder that's     #
# accessible by sqwebmail & courier-imap, but doesn't get downloaded  #
# by qmail-pop3d.  This way, we don't refuse any mail and it's fairly #
# easy for the enduser to review the spam to see if there's anybody   #
# they need to add to their white list.                               #
#######################################################################
        exception {
                to $HOME/$EXT/Maildir/.SPAM
        }
}
else
{
#######################################################################
# Ok, it's not marked as spam or there is no SPAM folder in the users #
# Maildir.  Pass it off to vpopmail's vdelivermail for final delivery.#
#######################################################################
        exception {
        to "| /var/qmail/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
        }
}

My initial tests look promising, so I will continue to try it out.  When I
combine this with the SpamAssassin user configuration cgi I wrote (see
http://www.gallowglass.org - yes, new url), it looks like I have the ability
to offer personalization of the basic spam tagging options to the individual
users of vpopmail domains.

Right now, my SpamAssassin admin program will only let the postmaster of a
vpopmail domain log in and make changes to the global options for the
domain.  Now to go work on an update to that :)

Dave



_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to