Bug #3359

sa-update without internet breaks spamd/amavisd

Added by Filippo Carletti over 5 years ago. Updated over 5 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-mail-filter
Target version:v6.7
Security class: Resolution:
Affected version:v6.7 NEEDINFO:No

Description

If Spamassassin rules update fails on first run after install, amavisd and/or spamd no longer start.

Steps to reproduce:
1. install spamassassin
2. remove connection to the internet (ip ro del default)
3. run sa-update
4. look into /var/lib/spamassassin/3.004001: no rules (only empty dirs)
5. restart spamd or amavisd: failure
spamd: config: no rules were found! Do you need to run 'sa-update'?
amavis: (!!)TROUBLE in pre_loop_hook: config: no rules were
found! Do you need to run 'sa-update'?

The default centos sa-update cron job, checks for a running
copy of spamd or amavisd, that are probably not to be found, so the
problem will never fix by itself.

For an in depth discussion see the following thread:
http://marc.info/?l=spamassassin-devel&m=144899537826979&w=2

Associated revisions

Revision eeac1136
Added by Filippo Carletti over 5 years ago

mail-filter: run sa-update if antispam is enabled. Refs #3359

Revision aa70038b
Added by Filippo Carletti over 5 years ago

mail-filter: cleanup templates expansion. Refs #3359

History

#1 Updated by Filippo Carletti over 5 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

A potential workaround is to force running sa-update even if amavisd is stopped, hoping that a next night run of sa-update succeed and fills the empty dir.

#2 Updated by Filippo Carletti over 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Filippo Carletti
  • % Done changed from 20 to 30

#3 Updated by Filippo Carletti over 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Filippo Carletti)
  • % Done changed from 30 to 60

#4 Updated by Filippo Carletti over 5 years ago

  • Description updated (diff)

#5 Updated by Filippo Carletti over 5 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-mail-filter-1.3.5-1.2.gaa70038.ns6.noarch.rpm

Test case:
repeat steps to reproduce, then run sa-update.cron and try to restart amavisd: it should start.
Note: sa-update.cron has a delay. To speed up things, make a copy, delete the sleep and run.

cp -p /usr/share/spamassassin/sa-update.cron .
sed -i "/sleep/d" sa-update.cron
./sa-update.cron

#6 Updated by Nicola Rauso over 5 years ago

  • Assignee set to Nicola Rauso

#7 Updated by Nicola Rauso over 5 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Nicola Rauso)
  • % Done changed from 70 to 90

Test case:
repeat steps to reproduce, then run sa-update.cron and try to restart amavisd: it should start.
Note: sa-update.cron has a delay. To speed up things, make a copy, delete the sleep and run.
[...]

Tested: OK

#8 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in 6.7 updates:
  • nethserver-mail-filter-1.3.6-1.ns6.noarch.rpm
Released in 7 updates:
  • nethserver-mail-filter-1.3.6-1.13.ge71be93.ns7.noarch.rpm

Also available in: Atom PDF