On Tue, 17 Jun 2003, Bowie Bailey wrote:
From: Mirko Zeibig [mailto:mirk...@zeibig.net]
I have almost this exact configuration running on my server. The
setup is a bit strange, but it works fine.
/etc/courier/maildroprc:
import RECIPIENT
LCRECIPIENT=tolower($RECIPIENT)
xfilter "/usr/local/bin/spamc -u $LCRECIPIENT"
You have to lowercase the recipient address so that "us...@domain.com"
and "US...@domain.com" are treated the same.
Spamd is started like this:
/usr/local/bin/spamd -d -r /var/run/spamd.pid -u mailuser -x
--virtual-config-dir='/home/vmail/%d/%l/spamassassin'
(Your mail client will probably fold it, but this is all one line)
Spamd parses the email address passed to spamc. The "%d" is the
domain part and "%l" is the local part. You can leave off the
"spamassassin" part of the config dir if you want, but this puts the
"user_prefs" file in the home directory and I prefer to group all the
spamassassin stuff together.
Hello Bowie,
thanks for your suggestion, after installing a newer version of
spamassassin (2.44-11.8.x) spamd recognizes a --virtual-config=dir option,
it does not, however, parse the %d and %l stuff but tries to find a
directory with % in it.
Which version do you run?
Btw: I believe you may import USER and use this instead of RECIPIENT,
this will match the userdb-entry. I think this should be a more secure way
as in my setup mails for user...@domain.com are delivered to us...@domain.com
as well, so RECIPIENT would fail and USER should not.
Best Regards
Mirko