LukeSmithxyz / emailwiz

Script that installs/configures a Dovecot, Postfix, Spam Assassin, OpenDKIM Debian web server
GNU General Public License v3.0
1.82k stars 301 forks source link

Make it work with Debian 12: spamassassin -> spamd #286

Closed runxiyu closed 1 year ago

runxiyu commented 1 year ago

This commits checks for /etc/default/spamassassin. If it exists, it's passed through sed to modify the CRON variable as usual, and spamassassin.service is enabled and restarted.

If /etc/default/spamassassin does not exist, but /etc/default/spamd exists, we modify /etc/default/spamd instead, and restart and enable spamd.service.

This has to be done because Debian 12 introduced this breaking change: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020859

This commit fixes #282