Mauro,

> The reasoning goes like this: we do all our alias- and
> list-expansion before calling the spamfilters to handle the
> inabilities of some of our mailfilters (not all are as flexible as
> AMaViS) and particularly to have per-user-filtering even on
> our lists. So when AMaViS gets the mail, there will be only
> one recipient left.
>
> Even though it's nice how AMaViS is applying some smart
> logic when dealing with multiple recipients in our case it
> will not be needed and we'd really like to use to use
> spamassassin's bayes-db on a per user basis.
>
> My assumption is that this is a rather simple change even
> though I'm not a perl-guru. So what I was looking for is the
> place where spamassassin is called within AMaViS and then
> change this call. Hopefully the RCPT TO-address is available
> at that point.

It is doable, see spamd for code example.

A ref to the envelope recipients list (only one element
in your case) is available in $msginfo->recips.

> It all boils down to this:
> sub initializeSpamAssassin {
>       username => $R,
> within the above block according to the manpage of
> Mail::SpamAssassin and be done with that, no?

No, this isn't the right place. Sub initializeSpamAssassin is
called before forking takes place, then several messages are
processed by the same child process.

You should be calling $spamassassin_obj->signal_user_changed
each time from within sub call_spamassassin.
See man Mail::SpamAssassin.

  Mark


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to