How can I upgrade to SpamAssassin 4.0?

Overview

As of May 1, 2023, SpamAssassin 4.0 packages are available in the danami-warden repository. The software will automatically upgrade to version 4.0 upon installation or update of Warden.

Prerequisites

  • Warden version 3.0 or later must be installed prior to upgrading.
  • Supported operating systems: RHEL, AlmaLinux, CloudLinux, and Rocky Linux versions 8.x and 9.x only.

New Features in SpamAssassin 4.0

  • IDN (Internationalized Domain Name) support.
  • Enhanced header address parser supporting multiple addresses, nested comments, and complex formatting.
  • DecodeShortURLs plugin for decoding shortened URLs within email messages.
  • DMARC policy plugin to verify compliance with domain DMARC policies.
  • ExtractText plugin utilizing external tools to extract text from message attachments and parts.
  • DKIM plugin now supports ARC signature verification.
  • ASN plugin integration with MaxMind ASN GeoDB for local ASN lookups.
  • Pyzor and Razor2 plugins now support asynchronous process forking, improving throughput similar to async DNS lookups.

The complete SpamAssassin 4.0 release announcement is available here.

Downgrading to SpamAssassin 3.4.6

If compatibility issues arise or a rollback is required, follow these steps to downgrade from SpamAssassin 4.0 to version 3.4.6:

  1. Execute the package downgrade command for your operating system:
    // AlmaLinux/RHEL/CloudLinux/RockyLinux 8+
    dnf downgrade spamassassin
  2. Disable plugins incompatible with SpamAssassin 3.4.6 by modifying configuration files in /etc/mail/spamassassin/*.pre:
    // disable any plugins that 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
  3. Remove SpamAssassin 4.0-specific configuration directives from /etc/mail/spamassassin/local.cf:
    // 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
  4. Validate the configuration syntax:
    // check for any errors in your configuration (it should return no output)
    spamassassin --lint
  5. Restart the Amavis service to apply changes:
    // restart amavis
    systemctl restart amavisd
  6. Prevent automatic re-upgrades during future package updates by excluding SpamAssassin in the repository configuration file /etc/yum.repos.d/danami-warden.repo:
    // add an exclude line to prevent SpamAssassin from being upgraded again during yum updates.
    sed -i '/^gpgkey/{s/.*/&\nexclude=spamassassin/;:a;n;ba}' /etc/yum.repos.d/danami-warden.repo

Troubleshooting & Verification

  • If spamassassin --lint returns errors, verify that all 4.0-specific configuration keys have been successfully removed from /etc/mail/spamassassin/local.cf.
  • Ensure no residual plugin load directives remain in the *.pre files within /etc/mail/spamassassin/.
  • If Amavis fails to start after the downgrade, review system logs at /var/log/maillog for detailed error messages related to module loading or syntax failures.
  • Confirm that the exclusion rule was correctly appended to /etc/yum.repos.d/danami-warden.repo by inspecting the file contents before running future package updates.
  • SpamAssassin 4.0
  • 0 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How can I install or upgrade the extension?

We provide free installation and configuration for all our paid licenses. Open a support ticket...

How can I add stronger Postfix restrictions so that the bulk of spam is rejected at the SMTPD level before it gets processed by Amavis?

Overview Warden enables administrators to enforce stricter Postfix SMTPD restrictions. These...

How can I change the interface language of the extension?

Overview This article provides instructions on how to change the interface language within the...

How can I configure greylisting with Warden Anti-spam and Virus protection?

Overview Greylisting is an email filtering mechanism designed to mitigate spam by temporarily...