From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PwI4e-0002ng-NJ for garchives@archives.gentoo.org; Sun, 06 Mar 2011 17:48:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F14E81C026; Sun, 6 Mar 2011 17:47:21 +0000 (UTC) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by pigeon.gentoo.org (Postfix) with SMTP id 7DB1A1C026 for ; Sun, 6 Mar 2011 17:47:21 +0000 (UTC) Received: (qmail invoked by alias); 06 Mar 2011 17:47:19 -0000 Received: from p54850C0B.dip0.t-ipconnect.de (EHLO gmx.net) [84.133.12.11] by mail.gmx.net (mp015) with SMTP; 06 Mar 2011 18:47:19 +0100 X-Authenticated: #20088476 X-Provags-ID: V01U2FsdGVkX1/G7poZ8qnG6iqEdmMP6P9b+E1VTb6Toe6ItvHzY2 BvOdKKvcIp+k6b Received: by gmx.net (nbSMTP-1.00) for uid 1001 Meino.Cramer@gmx.de; Sun, 6 Mar 2011 18:47:20 +0100 (CET) Date: Sun, 6 Mar 2011 18:47:19 +0100 From: meino.cramer@gmx.de To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] spamd and user nobody, sa-learn Message-ID: <20110306174719.GA6888@solfire> References: <20110306170724.178fd78b@karnak.local> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110306170724.178fd78b@karnak.local> User-Agent: mutt-ng/devel-r804 (Linux) X-Y-GMX-Trusted: 0 X-Archives-Salt: X-Archives-Hash: 977aa2a2eff0dc1c00e9a11a1a9c3dda David W Noon [11-03-06 18:16]: > On Sun, 06 Mar 2011 02:00:02 +0100, meino.cramer@gmx.de wrote about Re: > [gentoo-user] spamd and user nobody, sa-learn: > > >David W Noon [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] > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > dwnoon@ntlworld.com (David W Noon) > *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Does your "amavis" user own a home directory? Best regards mcc