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


Reply via email to