2

For a while now I'm getting the following error-mail sent to my root account on my server. This is a fail occurring every time on the daily spamassassin update.

My setup followed the Ars Technica Setup guide and I've already tried chown'ing the /var/lib/spamassassin by spamd. Even spamd:debian-spamd didn't help.

As for the OS I'm running Debian 8 Jessie and the newest spamassassin version.

So my question:
How can I fix this error?

Error message:

/etc/cron.daily/spamassassin:
error: unable to refresh mirrors file for channel updates.spamassassin.org, using old file
channel: could not find working mirror, channel failed
sa-update failed for unknown reasons

The results of # sa-update -D -v can be found here, as they're too large for this question.

SEJPM
  • 367
  • 5
  • 16

1 Answers1

7

As the execution of sa-update in you pastebin log was successful, I guess you we're running it as root.

Probably your directories /var/lib/spamassassin/ and /etc/spamassassin and the files inside don't have the correct permissions. Try to chown it as the user sa-update is intended to run in the cronjob (for Ubuntu its debian-spamd:debian-spamd => sudo chown -R debian-spamd:debian-spamd /etc/spamassassin /var/lib/spamassassin).

Jack Miller
  • 155
  • 1
  • 7
Henrik
  • 698
  • 5
  • 19
  • Yes I ran it as root (indicated by the #). This doesn't work because the user `sa-update` seems not to exist. I tried `# chown -R u:g /var/lib/spamassassin` with `u` as `root` and `sa-update` and `g` as `root` and `sa-update` – SEJPM Jul 11 '15 at 13:34
  • I'll give `debian-spamd:debian-spamd` (available for me) a try for this night. – SEJPM Jul 11 '15 at 13:36
  • Just look in `/etc/cron.daily/spamassassin` and you'll find a line like `su - debian-spamd -c "sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys"` - execute this for immediate testing :) – Henrik Jul 11 '15 at 13:37
  • maybe I'm just blind, but I can't find such a line in my `/etc/cron.daily/spamassassin`... However running the given command gave no output. – SEJPM Jul 11 '15 at 13:45
  • can you paste you `/etc/cron.daily/spamassassin` somewhere? – Henrik Jul 11 '15 at 14:33
  • [done](http://pastebin.com/uSpMBbdp). – SEJPM Jul 11 '15 at 16:37
  • ok, its this part `start-stop-daemon \ --chuid debian-spamd:debian-spamd --start \ --exec /usr/bin/sa-update -- \ --gpghomedir /var/lib/spamassassin/sa-update-keys` which is equivalent to the line I've mentioned before - So if this runs without error, then everything seems to be nice... – Henrik Jul 11 '15 at 16:41
  • I ran it and got no output (=good sign :) ). +1 for your answer and additional help and I'll accept it tomorrow when I see the job actually ran fine. – SEJPM Jul 11 '15 at 16:47
  • Tanks, hopefully its fixed :) – Henrik Jul 12 '15 at 08:28
  • Well, thank you. The above problem is indeed fixed. However a new problem arose: `gpg: WARNING: unsafe permissions on homedir `/var/lib/spamassassin/sa-update-keys'`. Nonetheless, you fixed the original problem -> accepted. – SEJPM Jul 12 '15 at 12:17
  • `sa-update-keys` should be `700` – Henrik Jul 12 '15 at 13:04
  • 1
    worked for the five days, but today I got the same mail that started the question... Do you recommend opening a new question? - Without the line `error: ...` – SEJPM Jul 18 '15 at 15:53