On Thu, Jan 02, 2020 at 10:42:57AM +0200, Harald Hannelius wrote: > 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?
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