Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057926 - sa-update does not run with amavisd
Summary: sa-update does not run with amavisd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: spamassassin
Version: 20
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Warren Togami
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-26 02:51 UTC by Alan Hamilton
Modified: 2014-06-01 22:21 UTC (History)
5 users (show)

Fixed In Version: spamassassin-3.4.0-4.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-01 22:21:32 UTC


Attachments (Terms of Use)

Description Alan Hamilton 2014-01-26 02:51:24 UTC
Description of problem:
Spamassassin installs a cron job to run sa-update.cron. This script checks to see if spamd or amavisd are running, or if updates are set in /etc/sysconfig/sa-update. If so, it runs sa-update to update the Spamassassin definitions.

This fails detect amavisd, and never runs sa-update even if amavisd is running.

Version-Release number of selected component (if applicable):
3.3.2-18

How reproducible:
Always

Steps to Reproduce:
1. Start amavisd.
2. Run /usr/share/spamassassin/sa-update.cron
2. Check /var/log/sa-update.log.

Actual results:
No status is reported (or file is not created).

Expected results:
A message like
23-Jan-2014 15:35:01: SpamAssassin: No update available
or
24-Jan-2014 04:42:53: SpamAssassin: Update processed successfully

Additional info:
sa-update.cron uses pgrep to find processes named "spamd" or "amavisd". This was changed from pidof in bug 755644 because pidof wasn't matching when there was extra text in the command line for spamd.

Unfortunately, this still doesn't work for amavisd. pgrep uses /proc/[pid]/stat to check the process name but that is truncated to 15 characters. Amavisd appears like "/usr/bin/amavi" and thus doesn't match.

The pgrep should probably be changed to pgrep -f, which checks the full command line.

Comment 1 Alan Hamilton 2014-01-26 03:14:42 UTC
I should also note that yes, pgrep -f increases the chance of a false hit, but checking for processes by name is an inexact science regardless.

The "correct" way is probably via systemctl, replacing the pgrep line with
/usr/bin/systemctl --quiet is-active $daemon

This works with amavisd; I don't have spamd running so I can't check that.

Comment 2 Kevin Fenzi 2014-01-28 20:38:55 UTC
Can you test this scratch build: 

http://koji.fedoraproject.org/koji/taskinfo?taskID=6465137

It has the pgrep -f change as well as switching to gnupg2 instead of gnupg1 (bug 1055593)

Feedback welcome.

Comment 3 Alan Hamilton 2014-01-29 03:52:38 UTC
It did detect amavisd, and installed an update successfully.

Comment 4 Fedora Update System 2014-03-19 16:56:02 UTC
spamassassin-3.4.0-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/spamassassin-3.4.0-3.fc20

Comment 5 Fedora Update System 2014-03-21 09:37:37 UTC
Package spamassassin-3.4.0-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing spamassassin-3.4.0-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4171/spamassassin-3.4.0-3.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-05-23 17:14:44 UTC
spamassassin-3.4.0-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/spamassassin-3.4.0-4.fc20

Comment 7 Fedora Update System 2014-05-24 23:27:09 UTC
Package spamassassin-3.4.0-4.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing spamassassin-3.4.0-4.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6643/spamassassin-3.4.0-4.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-06-01 22:21:32 UTC
spamassassin-3.4.0-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.