On Tue, 2008-07-08 at 10:53 +0200, Johannes Bauer wrote:
> Hello,
> 
> I would like to use the Dovecot antispam plugin to train SpamAssassin via
> sa-learn. I compiled the plugin and got it to work with the sendmail
> backend, which I tested by having it send a message to me.
> 
> As I'm calling SpamAssassin with amavisd-new, I have a system-wide Bayes
> db, maintained by the amavis user. As expected, the antispam plugin calls
> the configured binary as the mail user (I'm running deliver as suid, with
> mixed virtual and system accounts).
> 
> My question is: How can I get the plugin to call sa-learn as user amavis?
> 
> I have tried the following things:
> (1) making the amavis user's .spamassassin directory to world-writeable
> and handing the path to sa-learn with the --dbpath parameter. That failed
> - the IMAP client says "Move not allowed" when I try to move a message to
> or from the Spam IMAP folder.
> 
> (2) making a suid copy of sa-learn with owner amavis. This failed because
> of an sperl error.
> 
> (3) editing sudoers to allow 'sudo -u amavis sa-learn' without a password.
> This works fine on the command line, but fails with the same error as (1)
> when used with the plugin.

I have no idea. Try maybe writing a small C wrapper that checks the
arguments. Also check what user your imap is running under, normally it
would be the user who logged in unless those are virtual.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to