[Mimedefang] user_prefs for SpamAssassin w/ MIMEDefang

Kris Deugau kdeugau at webhart.net
Mon Aug 25 18:02:00 EDT 2003


Adam Rosenthal wrote:
> I'm trying to allow SpamAssassin to generate and use the user_prefs
> files for individual mail/user accounts on a mail server.  I've read
> that this should work by default but because I'm using MIMEDefang,
> something has to be tweaked.  Can someone tell me what needs to be
> changed and how to do it?

Whether you can do this depends on how you're calling SA.

If you're delivering mail to local accounts, via procmail (as is more or
less standard with sendmail), you should probably be calling SA from
procmail, and turning off the calls to SA from MIMEDefang.  (Unless you
want to reject high-scoring spam.)  This is by far easier, and less of a
hack.

If this machine only supports "virtual" accounts (ie, accounts which get
mail delivered to accounts which are not found in /etc/passwd), or is
just a relay box, you'll have to use stream_by_recipient() and/or
stream_by_domain() to effectively generate a copy of each message for
each destination account.  Then you'll have to load a user's preferences
and create a new SpamAssassin object for each message.  Someone posted
code to do so about two months ago IIRC.  SQL prefs are far easier to
deal with in this context as they don't require extra filesystem access.

If you're intent on using MD to call SA on local-user mail, you may have
to end up running MD as root (NOT recommended, and possibly not even
"allowed" without a patch any more) or switch to SQL prefs.

By default, MD now runs as user defang, group defang, and would NOT have
any access to even read default ~/.spamassassin/ files, much less write
to any of them (AWL and Bayes, for instance).

-kgd
-- 
<erno> hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.



More information about the MIMEDefang mailing list