David W Noon <dwn...@ntlworld.com> [11-03-06 18:16]:
> On Sun, 06 Mar 2011 02:00:02 +0100, meino.cra...@gmx.de wrote about Re:
> [gentoo-user] spamd and user nobody, sa-learn:
> 
> >David W Noon <dwn...@ntlworld.com> [11-03-05 15:43]:
> [snip]
> >> I need to specify the full path to the executable, /usr/bin/sa-learn,
> >> when I use sudo to run it as amavis. [Note that I use Spamassassin as
> >> part of Postfix via the amavisd-new daemon.  I also have my Bayes
> >> tokens in a PostgreSQL database.  So my sa-learn command looks rather
> >> different from yours anyway.]
> [snip]
> >no luck...the problem remains the same with or without the full
> >path...
> 
> Run visudo (as root) and check your sudo option.  The ones on my
> system, applicable to this, are as follows:
> 
> Defaults        env_reset, always_set_home
> 
> Cmnd_Alias SPAMASSASSIN
> = /usr/bin/sa-learn, /usr/bin/spamassassin, /usr/bin/spamc
> 
> %mail   ALL=(amavis) NOPASSWD: SPAMASSASSIN
> 
> [Note that the second one is on 1 line.  My newsreader has word-wrapped
> it to 2 lines at its first punctuation mark.]
> 
> This allows anyone in the "mail" group to run any of the end-user
> commands for Spamassassin as the "amavis" user, without requiring them
> to supply a password -- or even that "amavis" have a password.
> 
> I usually export spam or ham into an mbox file and then run:
> 
> sudo -u amavis /usr/bin/sa-learn --ham --mbox /tmp/good_ham.mbx
> 
> and this works well.
> -- 
> Regards,
> 
> Dave  [RLU #314465]
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> dwn...@ntlworld.com (David W Noon)
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Does your "amavis" user own a home directory?

Best regards
mcc


Reply via email to