#947927 mimedefang: Mimedefang is unable to start after upgrade of spamassassin

#947927#5
Date:
2020-01-02 08:24:03 UTC
From:
To:
Dear Maintainer,


There was an update on spamassassin two days ago, that updated to 3.4.2-1~deb9u2 on both
our incoming gateways. Both are debian 9, and both are also using mimedefang. Both now
cause mail to be queued if the mimedefang-milter is enabled.

Jan  2 10:13:05 server mimedefang-multiplexor[1026]: Starting slave 5 (pid 156560) (2 running): Bringing slaves up to minSlaves (2)
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: plugin: failed to parse plugin (from @INC): "qr_to_string" is not exported by the Mail::SpamAssassin::Util module
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/Rule2XSBody.pm line 41.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/Rule2XSBody.pm line 41.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Compilation failed in require at (eval 94) line 1.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: plugin: failed to parse plugin (from @INC): "compile_regexp" is not exported by the Mail::SpamAssassin::Util module
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/MIMEHeader.pm line 68.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/MIMEHeader.pm line 68.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Compilation failed in require at (eval 127) line 1.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: plugin: failed to parse plugin (from @INC): "compile_regexp" is not exported by the Mail::SpamAssassin::Util module
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr:  "qr_to_string" is not exported by the Mail::SpamAssassin::Util module
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/ReplaceTags.pm line 55.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/ReplaceTags.pm line 55.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Compilation failed in require at (eval 128) line 1.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: plugin: failed to parse plugin (from @INC): Bareword "RULENAME_RE" not allowed while "strict subs" in use at /usr/share/perl5/Mail/SpamAssassin/Plugin/Check.pm line 32.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Compilation failed in require at (eval 131) line 1.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: plugin: failed to parse plugin (from @INC): "compile_regexp" is not exported by the Mail::SpamAssassin::Util module
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/URIDetail.pm line 71.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/URIDetail.pm line 71.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Compilation failed in require at (eval 134) line 1.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: plugin: failed to parse plugin (from @INC): "compile_regexp" is not exported by the Mail::SpamAssassin::Util module
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Can't continue after import errors at /usr/share/perl5/Mail/SpamAssassin/Plugin/HTMLEval.pm line 27.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: BEGIN failed--compilation aborted at /usr/share/perl5/Mail/SpamAssassin/Plugin/HTMLEval.pm line 27.
Jan  2 10:16:31 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Compilation failed in require at (eval 141) line 1.
Jan  2 10:16:32 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Timeout::_run: check: no loaded plugin implements 'check_main': cannot scan!
Jan  2 10:16:32 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: Check that the necessary '.pre' files are in the config directory.
Jan  2 10:16:32 server mimedefang-multiplexor[1026]: 0028GNZ7156694: Slave 8 stderr: At a minimum, v320.pre loads the Check plugin which is required.
Jan  2 10:16:32 server mimedefang-multiplexor[1026]: Slave 8 died prematurely -- check your filter rules
Jan  2 10:16:32 server mimedefang-multiplexor[1026]: Reap: slave 8 (pid 156278) exited normally with status 255 (SLAVE DIED UNEXPECTEDLY)
Jan  2 10:16:32 server mimedefang-multiplexor[1026]: Slave 8 resource usage: req=1, scans=1, user=0.620, sys=0.028, nswap=0, majflt=0, minflt=10567, maxrss=64928, bi=0, bo=496
Jan  2 10:16:32 server mimedefang[1048]: 0028GNZ7156694: Error from multiplexor: ERR No response from slave


*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

#947927#10
Date:
2020-01-02 08:42:57 UTC
From:
To:
It seems like a restart of mimedefang was needed after an upgrade of
spamassassin (and spamd). It might be the spamassassin package's
responsibility to do that?

#947927#25
Date:
2020-01-05 01:02:50 UTC
From:
To:
Cross-package coordination of this nature involves the dpkg triggers
facility documented in /usr/share/doc/dpkg-dev/triggers.txt.gz and
deb-triggers(5).

As an initial proposal, spamassassin could emit a "spamassassin-upgrade"
trigger, and mimedefang could register an interest in that.  So,
spamassassin would add the following to postinst:

  dpkg-trigger --no-await spamassassin-upgrade

Mimedefang would register an interest in the trigger via
debian/mimedefang.triggers:

  interest-noawait spamassassin-upgrade

And would restart itself via the following in postinst:

  if [ "$1" = "triggered" ] && [ "$2" = "spamassassin-upgrade" ]; then
      echo "restarting mimedefang because of spamassassin-upgrade trigger"
      invoke-rc.d mimedefang restart
  fi

I think that'd basically do it.

Does mimedefang only need to restart when spamassassin is upgraded, or
any time it restarts?  I.e if you simply invoke "systemctl restart
spamassassin.service", does mimedefang get stuck?  If so, we may need
some other kind of coordination.  We have a bit of a template for that
in the form of /etc/spamassassin/sa-update-hooks.d/, but nothing that
specifically addresses this issue.

noah

#947927#30
Date:
2025-01-08 19:16:04 UTC
From:
To:
Hi Christoph.  Debian bug #947927 has been open for a few years now.  In
it, it appears that there may be some need to trigger a mimedefang
service restart upon spamassassin package upgrades.  Do you believe this
would still be useful?  If so, I can implement the dpkg triggers I'd
previously suggested.  I can look into implementing the trigger handler
in mimedefang if that'd be helpful.

noah

#947927#35
Date:
2025-01-09 10:29:15 UTC
From:
To:
Hi noah,

Am 08.01.25 um 20:16 schrieb Noah Meyerhans:

I would be happy about a patch. Maybe you can create a pull request
against the salsa repository.

Cheers

Christoph