SpamAssassin Daily Updates Script Failure Reports

Our MiaB server has been sending reports that the daily cronjob for SpamAssassin updates contains a command that has been failing. The message subject is Cron <root@mail> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) and the body is

/etc/cron.daily/spamassassin:
command 're2c -i -b -o scanner1.c scanner1.re' failed: exit 0

which indicates that the script ran to its end. If I manually run /etc/cron.daily/spamassassin as root then no error is reported, which is consistent with the exit 0 code. If I manually run re2c -i -b -o scanner1.c scanner1.re as root then it returns re2c: error: cannot open source file: scanner1.re which seems consistent with the failure report. I downloaded and viewed the /etc/cron.daily/spamassassin file. The only instance of the re2c command is in this section of the script:

do_compile() {
# Compile rules if the required tools are available. Prior to version
# 3.3.2-8, there was an additional check to verify that an sa-compile
# run had previously been executed by hand. With sa-learn now
# distributed in a separate, optional, package, this check is no
# longer necessary.
    if [ -x /usr/bin/re2c -a -x /usr/bin/sa-compile ]; then
        env -i LANG="$LANG" PATH="$PATH" start-stop-daemon \
            --chuid debian-spamd:debian-spamd --start \
            --exec /usr/bin/sa-compile -- --quiet

        # Fixup perms -- group and other should be able to
        # read and execute, but never write.  Works around
        # sa-compile's failure to obey umask.
        chmod -R go-w,go+rX /var/lib/spamassassin/compiled
    fi
}

I checked the contents of the /var/lib/spamassassin/compiled directory and found that it contains new rules which were compiled this morning. This suggests that the reported failures might be harmless.

I am wondering whether others have been receiving these reports of partial failure of the daily cronjob for SpamAssassin updates. I cannot determine whether the reports indicate a problem with SpamAssassin that I need to fix. Any insight from others would be appreciated.

With thanks in advance,

Michael

I am still left wondering whether others have been receiving these reports of partial failure of the daily cronjob for SpamAssassin updates. If any other MiaB users are receiving these reports, please post a reply reporting this. If no one replies, then I will assume that the SpamAssassin update process on our MiaB instance somehow broke.

Our MiaB server also started reporting:

File "/usr/local/lib/mailinabox/env/lib/python3.6/codecs.py", line 321, in decode
   (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbb in position 4874: invalid start byte

Reinstalling the spamassassin and python3 packages seems to have fixed these problems. This was done by running the following commands as the root user:

apt-get install --reinstall --show-progress spamassassin

apt-get install --reinstall --show-progress python3

Hopefully this information will help others to correct similar problems.

1 Like

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.