How can I upgrade to SpamAssassin 4.0?

Experienced admins wanting to test out release candidate builds of SpamAssassin 4.0 can follow the instructions below:

Important:

  • SpamAssassin 4.0 is only supported as of Warden 3.0. You must have Warden 3.0 installed before upgrading.
  • These are release candidate builds for testing purposes only. The final release of SpamAssassin 4.0 will be added to the main danami-warden repo after it's official release.
  • The current builds are of SpamAssassin 4.0-RC3 released on Sept 22, 2022.
  • These builds are for RHEL/AlmaLinux/CloudLinux/RockyLinux 8 only.

Whats new in SpamAssassin 4.0?

  • IDN (Internationalized domain name) support.
  • An improved header address parser that also handles multiple addresses, nested comments, and other oddities.
  • A new DecodeShortURLs plugin that decodes shortened URLs in messages.
  • A new DMARC policy plugin to check if an email respects its domain DMARC policy.
  • A new ExtractText plugin that uses external tools to extract text from message parts.
  • The DKIM plugin now supports ARC signature verification.
  • The ASN plugin now supports the MaxMind ASN GeoDB for local ASN lookups.
  • Pyzor and Razor2 can now fork separate processes and read the results in later (similar to async DNS lookups) which increases throughput.

Upgrading SpamAssassin

To upgrade from SpamAssassin 3.4.6 to SpamAssassin 4.0 run the command:

// AlmaLinux/RHEL/CloudLinux/RockyLinux 8
dnf update spamassassin --enablerepo=danami-warden-testing

// check for any errors in your configuration (it should return no output)
spamassassin --lint

// restart amavis
systemctl restart amavisd

After upgrading go to Warden -> Settings -> Plugin Settings and enable any new plugins you want to use.

Downgrading SpamAssassin

To downgrade from SpamAssassin 4.0 back to SpamAssassin 3.4.6 run the commands:

// AlmaLinux/RHEL/CloudLinux/RockyLinux 8
dnf downgrade spamassassin

// disable any plugins that are are not supported by SpamAssassin 3.4.6
sed -s -i -e "s/^loadplugin Mail::SpamAssassin::Plugin::RelayCountry/#loadplugin Mail::SpamAssassin::Plugin::RelayCountry/" /etc/mail/spamassassin/*.pre
sed -s -i -e "s/^loadplugin Mail::SpamAssassin::Plugin::WelcomeListSubject/#loadplugin Mail::SpamAssassin::Plugin::WelcomeListSubject/" /etc/mail/spamassassin/*.pre
sed -s -i -e "s/^loadplugin Mail::SpamAssassin::Plugin::URILocalBL/#loadplugin Mail::SpamAssassin::Plugin::URILocalBL/" /etc/mail/spamassassin/*.pre

// remove any spamassassin 4.0 config options that are not supported by SpamAssassin 3.4.6
sed -i '/^welcomelist_from_spf \|^asn_use_geodb \|^asn_prefer_geodb \|^asn_use_dns \|^use_auto_welcomelist \|^auto_welcomelist_factor \|^auto_welcomelist_ipv4_mask_len \|^auto_welcomelist_ipv6_mask_len \|^welcomelist_from_dkim \|^freemail_welcomelist \|^freemail_import_welcomelist_auth \|^freemail_import_def_welcomelist_auth \|^pyzor_fork \|^pyzor_count_min \|^pyzor_welcomelist_min \|^pyzor_welcomelist_factor \|^razor_fork \|^txrep_welcomelist_out \|^welcomelist_bounce_relays /d' /etc/mail/spamassassin/local.cf

// check for any errors in your configuration (it should return no output)
spamassassin --lint

// restart amavis
systemctl restart amavisd
  • SpamAssassin 4.0
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I fix the error: Mysql Server has gone away?

When looking at the mail log of the server you see this log entry from Amavis: Aug 3 01:00:20...

What changes does Warden make to the postfix configuration files to enable Amavis?

Important Warden will configure postfix differently depending if you selected to install the...

How hard is it to uninstall if I do not require Warden Anti-spam and Virus Protection any more?

Uninstalling Warden is as easy as going to Extensions -> My Extensions -> Warden Anti-spam...

How can I fix the error: host 127.0.0.1[127.0.0.1] said: 552 5.3.4 Declared message size (1208029 B) exceeds size limit for recipient?

You can set the message size limit for Amavis under Settings -> Policy Settings -> Misc...

How do I fix the error: Unit is masked. when trying to start SpamAssassin?

You should not try to start the SpamAssassin service. Warden disables (masks) the SpamAssassin...