1 |
David W Noon <dwnoon@××××××××.com> [11-03-06 18:16]: |
2 |
> On Sun, 06 Mar 2011 02:00:02 +0100, meino.cramer@×××.de wrote about Re: |
3 |
> [gentoo-user] spamd and user nobody, sa-learn: |
4 |
> |
5 |
> >David W Noon <dwnoon@××××××××.com> [11-03-05 15:43]: |
6 |
> [snip] |
7 |
> >> I need to specify the full path to the executable, /usr/bin/sa-learn, |
8 |
> >> when I use sudo to run it as amavis. [Note that I use Spamassassin as |
9 |
> >> part of Postfix via the amavisd-new daemon. I also have my Bayes |
10 |
> >> tokens in a PostgreSQL database. So my sa-learn command looks rather |
11 |
> >> different from yours anyway.] |
12 |
> [snip] |
13 |
> >no luck...the problem remains the same with or without the full |
14 |
> >path... |
15 |
> |
16 |
> Run visudo (as root) and check your sudo option. The ones on my |
17 |
> system, applicable to this, are as follows: |
18 |
> |
19 |
> Defaults env_reset, always_set_home |
20 |
> |
21 |
> Cmnd_Alias SPAMASSASSIN |
22 |
> = /usr/bin/sa-learn, /usr/bin/spamassassin, /usr/bin/spamc |
23 |
> |
24 |
> %mail ALL=(amavis) NOPASSWD: SPAMASSASSIN |
25 |
> |
26 |
> [Note that the second one is on 1 line. My newsreader has word-wrapped |
27 |
> it to 2 lines at its first punctuation mark.] |
28 |
> |
29 |
> This allows anyone in the "mail" group to run any of the end-user |
30 |
> commands for Spamassassin as the "amavis" user, without requiring them |
31 |
> to supply a password -- or even that "amavis" have a password. |
32 |
> |
33 |
> I usually export spam or ham into an mbox file and then run: |
34 |
> |
35 |
> sudo -u amavis /usr/bin/sa-learn --ham --mbox /tmp/good_ham.mbx |
36 |
> |
37 |
> and this works well. |
38 |
> -- |
39 |
> Regards, |
40 |
> |
41 |
> Dave [RLU #314465] |
42 |
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
43 |
> dwnoon@××××××××.com (David W Noon) |
44 |
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
45 |
|
46 |
Does your "amavis" user own a home directory? |
47 |
|
48 |
Best regards |
49 |
mcc |