[Mimedefang] MIMEDefang and mailman

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Wed Feb 22 12:11:43 EST 2006

David F. Skoll wrote:
> On Monday 20 February 2006 19:00, Michael Lang wrote:
>> I don't mind if I have to put something like..
>> if ($to == "list1" | $to == "list2") {
>> 	$user = "mailman";
>> }
> You can do this, but you need to interface with SpamAssassin
> at a much lower level.  You can't use our built-in spam_assassin_*
> functions, because they instantiate one Mail::SpamAssassin object
> which can't then have its user preferences changed.
> Instead, read the Mail::SpamAssassin man page.  You need to create
> a new Mail::SpamAssassin object for each different user, and each
> object should point to the appropriate userprefs_filename.  With some
> book-keeping, you can make these per-user objects persistent for an
> entire slave's lifetime so you're not necessarily making a new
> Mail::SpamAssassin object for each message.

Or... if I could offer an alternative... you could use spamd, and call spamc from mimedefang-filter, with a well-chosen -u parameter.

See http://www.mimedefang.com/kwiki/index.cgi?SpamassassinSpamcSpamd for an example...

Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
Hispanic Business Inc./HireDiversity.com       Software Engineer

More information about the MIMEDefang mailing list