On Monday 21,March,2011 09:46 PM, Matus UHLAR - fantomas wrote:
> Can you advise me a (simple) way to integrate SpamAssassin checking at MTA
> level?
> 
> We use courierperlfilter for clamav scanning and logging and I could add
> calling spamc to it, but I'd like to know if there are other nice ways.

The advantage of running spamc from perl/pythonfilter (IMO) is that you
can reject mail based on spam score.  The disadvantage, if I understand
correctly, is that you can't have per-user settings for virtual users
because spamassassin looks for settings in the HOME directory of the
user who called it.

If you don't mind accepting spam messages (you can bounce or bitbucket
them later), you can use maildrop as the delivery agent and call spamc
from a maildrop config file.  This allows you to use per-user settings
for virtual users.

So we run spamd with "--username=daemon --groupname=daemon
--nouser-config --virtual-config-dir=/path/to/virtual/users/%u" and then
in 'maildroprc' we have

import RECIPIENT
exception {
  xfilter "/usr/bin/spamc -u $RECIPIENT"
}

This allows spamd to pick up each user's settings from
"/path/to/virtual/users/$RECIPIENT" rather than looking for them in the
'daemon' user's HOME directory (since the virtual users are all owned by
'daemon' in this case).

If I'm wrong and you can have per-user settings for virtual users with a
perl/pythonfilter, I'd appreciate hearing how to do it.

HTH

Jeff Jansen


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to