On Thu, 2003-06-26 at 22:08, Gonzo wrote:
> Hello.
> 
> I have qmail with vpopmail installed.
> I don't know how to filter out spam mails.
> SpamAssassin seems to not support virtual domains and even if it would
> support them, how to tell procmail to filter mails for vpopmail?
> 
> Gonzo

I have a setup that my users are happy with. 

In short, this is what it does...
It filter out spam to the users .spam directory with a sitewide ruleset
It lets the users toogle filtering on or off from qmailadmin
It doesn't use qmail-scanner   

Install spamassasssin, according to the manual, perform the tests to
make sure it is working.

Install a recent qmailadmin (>= 1.0.21) , compile it with the following
options, among the other ones.

Install a recent version of promail (3.22 or later) or you will notice
that the files insade the maildirs looks sorta strange... erlier
procmail doesnt use the maildir name-style format of the files.

(watch out for lne wrapping here...)
--enable-modify-spam=y \
--enable-spam-command='|preline /usr/bin/spamc -e /usr/bin/procmail -mp
../procmailfilter'

The recent versions of qmailadmin has a "detect-spam" option which the
user can toogle on/off as they like. 

~vpopmail/domains/example.net/user/.qmail will look like this when
detect-spam is checked;

|preline /usr/bin/spamc -e /usr/bin/procmail -mp ../procmailfilter'


create a decent procmailrc file and put it in the path defined withteh
--enable-spam-command option. in this example it would be;

~vpopmail/domains/example.net/procmailfilter


# Example of a global procmailfilter for qmail-vpopmail 
# -----------------------------------------------------
# 
# This file should be be named as stated below
# ~/vpopmail/domains/<whatever.com>/procmailfiler
#
# This procmailfilter is supposed to be invoked
# from ~vpopmail/domains/<whatever.com>/<user>/.qmail
#
# The .qmailfile should contain the following line
# |preline /usr/bin/procmail -mp ../procmailfilter
# 
# It is possible to make the line default for any
# .qmail files  created by users through qmailadmin 
# versions 1.0.21 or later.
#

# Shell to execute commands inside.
SHELL="/bin/bash"

# Verbose mode (yes|no)
# If set to "yes" you qmail-send log
# will be full of verbose stuff.
#VERBOSE="yes"
VERBOSE="no"

# Make sure that we have a .SPAM folder to sort SPAM into.
# This will create a ~vpopmail/domains/<domain>/<user>/Maildir/.SPAM
# direcory. This directory will be created as soon as the user 
# recives any mail. Spam or ham doesn't matter.  It simply creates
# the .SPAM directory, as well as subscribes it to courier-imap 
:0wic
* ? test ! -d ./Maildir/.SPAM
|( /var/qmail/bin/maildirmake ./Maildir/.SPAM ; \
        /bin/echo "INBOX.SPAM" >> ./Maildir/courierimapsubscribed )

# Sort anything marked as SPAM into the users Maildir/.SPAM/ .
:0:
* ^X-Spam-Status: YES
./Maildir/.SPAM/

# Everything else goes to the users default Maildir/ .
:0:
*
./Maildir/

#EOF





 
-- 
i3 micro technology ab
Lars Gustafson
System Administrator
phone: +46(0)850638856
mobile:+46(0)708472037
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to