From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9F9AD138C9D for ; Sun, 26 Apr 2015 17:41:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED917E085B; Sun, 26 Apr 2015 17:41:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EBAA6E084D for ; Sun, 26 Apr 2015 17:41:24 +0000 (UTC) Received: from [192.168.1.100] (c-98-218-46-55.hsd1.md.comcast.net [98.218.46.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mjo) by smtp.gentoo.org (Postfix) with ESMTPSA id CC490340CE7 for ; Sun, 26 Apr 2015 17:41:23 +0000 (UTC) Message-ID: <553D2341.2060706@gentoo.org> Date: Sun, 26 Apr 2015 13:41:21 -0400 From: Michael Orlitzky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] how to update spamassassin with sa-update References: <87a8xv861p.fsf@heimdali.yagibdah.de> <1826053.f8l0guqXHb@elijah> In-Reply-To: <1826053.f8l0guqXHb@elijah> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: dfde54a3-6f9e-4ef6-80a1-f28adbe2a4dd X-Archives-Hash: 89d679a97cf9fcfb57a29f9ea8119c41 On 04/26/2015 10:55 AM, Alex Brandt wrote: > On Sunday, April 26, 2015 13:47:46 lee wrote: >> Hi, >> >> installation notes for spamassassin say you need to do the rule updates >> yourself by running 'sa-update'. >> >> Now I'd do that with a crontab entry, and I don't want to add it to >> root's crontab. As what user should I run it, and where do I put the >> crontab entry for it? > > I use a cronjob in /etc/cron.hourly so it runs as part of the system crontab. > Same here (cron.daily)... you might be able to get away with running it under a non-root account, but it would need write access to (at least) /var/lib/spamassassin. The sa-update program is noisy so I wound up with this: #!/bin/bash # First, silence stdout. exec 1>/dev/null # This thing spits out its progress to stderr. sa-update 2>/dev/null # Exit code 0 means new updates were installed. Exit code 1 means we # were already up-to-date. Anything else is failure. if [ $? -eq 0 ]; then sa-compile # Are you using amavis? # /etc/init.d/amavisd reload fi