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 1PwHSC-0004y7-1D for garchives@archives.gentoo.org; Sun, 06 Mar 2011 17:09:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3034D1C07A; Sun, 6 Mar 2011 17:07:38 +0000 (UTC) Received: from karnak.local (cpc2-lutn10-2-0-cust603.9-3.cable.virginmedia.com [81.97.90.92]) by pigeon.gentoo.org (Postfix) with ESMTP id E8FE91C07A for ; Sun, 6 Mar 2011 17:07:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by karnak.local (Postfix) with ESMTP id D5C623003 for ; Sun, 6 Mar 2011 17:07:36 +0000 (GMT) X-Virus-Scanned: by amavisd-new using ClamAV at karnak.local Received: from karnak.local ([127.0.0.1]) by localhost (karnak.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Xy4w7mq77EK for ; Sun, 6 Mar 2011 17:07:33 +0000 (GMT) Received: from karnak.local (localhost [127.0.0.1]) by karnak.local (Postfix) with ESMTP id AD5D33002 for ; Sun, 6 Mar 2011 17:07:33 +0000 (GMT) Date: Sun, 6 Mar 2011 17:07:24 +0000 From: David W Noon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] spamd and user nobody, sa-learn Message-ID: <20110306170724.178fd78b@karnak.local> In-Reply-To: References: Organization: Luton Operatic Society X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; i686-pc-linux-gnu) 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: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/mJa7boWwjBpxkKSAMy7.ndg"; protocol="application/pgp-signature" X-Archives-Salt: X-Archives-Hash: 29baece246a93388d3bbfe0022259f55 --Sig_/mJa7boWwjBpxkKSAMy7.ndg Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 =3D /usr/bin/sa-learn, /usr/bin/spamassassin, /usr/bin/spamc %mail ALL=3D(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. --=20 Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* dwnoon@ntlworld.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* --Sig_/mJa7boWwjBpxkKSAMy7.ndg Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk1zv1UACgkQc9/LpQ70v4+KlgCeNfaW6NI7mOSJo+hIwG6k8oZ9 IOAAniH5fyXWVQ+lzBWF8CXZFt/NQPTY =m/cv -----END PGP SIGNATURE----- --Sig_/mJa7boWwjBpxkKSAMy7.ndg--