Apache SpamAssassin Anti-Spam Filter

AWS Security

Apache SpamAssassin, the open source mail spam filter whose spamd daemon and rules engine score every message so your mail system can flag or reject junk.

Base
Hardened build
minimal ports, security patches applied at build time
Access
Unique credentials
generated on first boot, readable only by root
Verified
Boots working
services pass a health gate before release
Support
24/7, 365 days
by email and live chat, 24 hour response SLA

Overview

Apache SpamAssassin is the long established open source anti spam platform. Its spamd daemon scores each message against a large, regularly updated rule set that combines header and body heuristics, Bayesian statistical filtering, DNS blocklists, SPF and DKIM checks and network tests, then returns a spam score and a verdict. Mail systems hand messages to it through the fast spamc client or a milter, so a message that crosses the score threshold is tagged with spam headers your mail server can act on, filing it, quarantining it or rejecting it. It runs as a single self contained service with no database to administer, and its behaviour is driven entirely from readable configuration files, so the whole filtering policy lives in text you can version and review.

It suits anyone running their own mail: pairing it with Postfix or Exim to score inbound mail, giving a small team a self hosted spam filter they own inside their own cloud account, or scoring messages on demand from a script.

Why the cloudimg image

SpamAssassin has no login of its own, so what matters is that the scanning daemon is never left open, and cloudimg ships it exactly that way. The spamd daemon runs as a dedicated non root system user and is bound to loopback with its accept list restricted to loopback, so nothing off the instance can reach it until you explicitly widen access to your own mail hosts with the bundled sa access tool. A current rule set is fetched at build time and the maintenance timer is left enabled so every instance keeps its rules fresh, the configuration is checked clean before the image is sealed, and a first boot service records the instance details to a root only file. Every deployment comes with a paired deploy guide and 24/7 cloudimg support.

Common uses

  • Score inbound mail for Postfix or Exim and flag or reject spam
  • A self hosted spam filter you own inside your own cloud account
  • Score messages on demand from a script through the spamc client

Key features

  • Ships secure with zero network exposure. The scanning daemon is locked to loopback-only by default with no open port - you explicitly grant access only to your trusted mail hosts using the bundled sa-access tool, which refuses world-open configurations as a hard guardrail. No post-launch lockdown required.
  • Production-ready in minutes, not hours. spamd runs as a dedicated non-root user, the rule set is current at launch and auto-refreshes via the OS maintenance schedule, and the GTUBE test string lets you prove end-to-end spam detection immediately. Scores every message against hundreds of tests including header heuristics, Bayesian analysis, DNS blocklists, and SPF/DKIM checks.
  • 24/7 cloudimg support with one-hour average response for critical issues. Engineers help you integrate with Postfix, Exim, Sendmail, amavisd or dovecot, safely open spamd to trusted hosts, tune scores and thresholds, develop custom rules, and train the Bayesian classifier. SpamAssassin installs unmodified from the OS package archive so it stays covered by standard security updates.

See it running

Real screenshots taken while testing this image against its deployment guide.

Apache SpamAssassin Anti-Spam Filter screenshot 1 Apache SpamAssassin Anti-Spam Filter screenshot 2 Apache SpamAssassin Anti-Spam Filter screenshot 3

Description

This is a repackaged open source software product wherein additional charges apply for cloudimg support services.

## Overview

Apache SpamAssassin is the open source, Apache-2.0 licensed anti-spam platform: a rule-based mail filter that scores every message on hundreds of tests - header and body heuristics, Bayesian statistics, DNS blocklists, SPF/DKIM checks and collaborative-filtering signals - and flags anything over a configurable threshold as spam. It is the de facto standard spam filter for Unix mail servers and integrates with Postfix, Exim, Sendmail, amavisd and dovecot. This AMI delivers SpamAssassin fully configured as a ready-to-run scanning appliance: the spamd scanning daemon and the spamc client are installed, a current rule set is fetched, and the daemon is hardened - SSH in and pipe a message through spamc and it is scored immediately.

## Secure by Default - Loopback Only

The spamd daemon is bound to the loopback address (127.0.0.1) and its allow-list is restricted to 127.0.0.1, so nothing off the instance can reach it until you explicitly widen access. The security group opens only SSH. This means the image ships as a non-network service with no exposed scanning port - you decide which trusted mail hosts may connect, using the bundled sa-access tool, and open the matching port in your own security group.

## Why Choose This AMI Over Self-Installation

Standing SpamAssassin up correctly involves more than installing a package: the daemon should run as a non-root user, its network exposure must be locked down, and the rule set must be current and kept fresh. This AMI handles all of it:

  • Non-root, hardened daemon - spamd runs as a dedicated non-root system user via a systemd drop-in, using an ambient capability to bind the privileged default port without running as root.
  • Loopback-only by default - the daemon listens on 127.0.0.1 and only accepts connections from 127.0.0.1, so it has no attack surface off the box until you open it.
  • Current rule set, kept fresh - sa-update fetches a current rule set at build time and the operating system's maintenance schedule keeps refreshing rules on your instance.
  • A management CLI for exposure - the bundled sa-access tool lets you allow a trusted mail-host network, revoke it, or revert to loopback-only, and refuses a world-open exposure as a hard guardrail.

## How Spam Scoring Works Here

  • A mail system (or you, by hand) pipes a message into spamc
  • spamc hands it to the loopback spamd daemon, which scores it against the rule set
  • spamd returns the message annotated with X-Spam-Status, an X-Spam-Score and, if it is over the threshold, X-Spam-Flag: YES
  • Your mail system routes flagged mail to a spam folder or rejects it
  • The standard GTUBE test string always scores as spam, so you can prove detection end to end at any time

## Getting Started

1. Launch the AMI on your preferred EC2 instance type

2. Connect over SSH using your key pair as the default login user

3. Read the instance note with sudo cat /root/spamassassin-info.txt

4. Confirm the daemon and its loopback-only exposure with sudo sa-access status

5. Pipe the GTUBE test string through spamc to see a message flagged as spam

6. When you are ready, open spamd to a trusted mail-host network with sudo sa-access allow, and open TCP 783 to that network in your security group

## Security Practices

SpamAssassin is installed unmodified from the operating system's official package archive, so it is covered by standard unattended security updates. The scanning daemon runs as a non-root user, binds loopback only, and accepts only a loopback allow-list by default. SSH access uses key-based authentication. There is no login, no web interface and no credential - access control is by network, and you grant it only to the networks you trust.

## Use Cases

  • Mail-server spam filtering - Score inbound mail for Postfix, Exim, Sendmail, amavisd or dovecot
  • Dedicated scanning host - Run spamd as a hardened, network-restricted scanning appliance for a mail cluster
  • Spam-rule development and testing - Lint and test custom rules and thresholds against real messages
  • Compliance-driven mail hygiene - Add a documented, auditable spam-scoring layer to a mail pipeline

## cloudimg Support

24/7 technical support by email and live chat covers integrating SpamAssassin with your MTA, opening spamd to trusted mail hosts safely, tuning scores and thresholds, custom rule development, keeping the rule set fresh, and Bayesian training. Critical issues receive a one-hour average response.

## Next Steps

Contact support@cloudimg.co.uk to request an integration walkthrough for your mail transport agent, a rule-tuning session, or to ask any pre-purchase questions about the product.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Related technologies

anti-spam filterspam scoringemail filteringmail security appliancespamd daemonbayesian spam filterdns blocklistspf dkim checkmail hygienespam detection