Public bug reported:

Binary package hint: spamassassin

/etc/cron.daily/spamassassin runs spamassassin reload which does not
notify amavisd that there are new SpamAssassin rules.

I noticed this today after the sa-update run installed a new version of
72_active.cf to fix the notorious FH_DATE_PAST_20XX bug. Mails were
still tagged like this:

X-Spam-Status: No, score=2.686 tagged_above=2 required=5
        tests=[BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188,
        FORGED_HOTMAIL_RCVD2=1.502, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.596]
        autolearn=no

This happens when you run SpamAssassin through Amavis (package amavisd-
new) because the amavisd processes seem to  need a restart to use the
updated rules.

Since the cron job knows if there are indeed updates, it is probably the
best place to trigger this restart. Probably with something  like this:

# Reload
if which invoke-rc.d >/dev/null 2>&1; then
    invoke-rc.d spamassassin reload > /dev/null 2>&1
    if [ -f /var/run/amavis/amavis.pid ]; then
        invoke-rc.d amavis restart > /dev/null 2>&1
    fi
else
    /etc/init.d/spamassassin reload > /dev/null 2>&1
    if [ -f /var/run/amavis/amavis.pid ]; then
        /etc/init.d/amavis restart > /dev/null 2>&1
    fi
fi

I'm using /var/run/amavis/amavis.pid as a trigger to avoid starting
amavisd if it isn't already running.

** Affects: spamassassin (Ubuntu)
     Importance: Undecided
         Status: New

-- 
/etc/cron.daily/spamassassin should restart amavisd
https://bugs.launchpad.net/bugs/502615
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to