All help articles

Spam filtering (Rspamd)

Zappocity scores mail from other servers with Rspamd while it arrives, and files it in the inbox or Junk, or refuses it, by the recipient's rules. ClamAV plugs into Rspamd's antivirus module for viruses. What people move into and out of Junk teaches Rspamd, from webmail and from any mail app.

Turning it on

Install Rspamd (and, if you want virus scanning, ClamAV with Rspamd's antivirus module) on the server or one it can reach. Then, in the admin panel under Settings → Spam filtering (Rspamd), or from the command line:

sudo corpsuite spam set enabled:=true url=http://127.0.0.1:11334 password=-

Changes apply within 30 seconds on every server, at once on the one that saved them. Test connection (or corpsuite spam test) checks the saved settings: that Rspamd answers, how fast, and that the controller takes the password.

What happens to a message

Each recipient has a junk score and a reject score:

ScoreWhat happens
Below the junk scoreDelivered as usual.
From the junk scoreFiled in Junk.
From the reject scoreRefused for that recipient.

The scores come from the user's own setting, else their team's, else the platform's (6 and 15 by default). The reject score is set for a whole team; users only choose their junk score.

Mail between users of this server is not scanned.

Learning

Moving a message into Junk teaches Rspamd it is spam; moving it out of Junk to any folder but Trash teaches it it is not. This works for webmail, for mail apps over IMAP (moving or copying into Junk) and for anything using JMAP. Mail the server itself files in Junk teaches nothing. Lessons are sent every 30 seconds with the user's address as Deliver-To, so Rspamd's per-user statistics work when you turn them on in Rspamd. While Rspamd is down they wait, for up to a day.

Teams and users

For developers

GET/PATCH /v1/spam-settings, /v1/tenants/{tenantId}/spam-policy and /v1/tenants/{tenantId}/accounts/{accountId}/spam-policy in api/openapi.yaml, and GET/PUT /api/mail/spam-policy in api/webmail.yaml. Reports: /v1/spam-reports, /v1/tenants/{tenantId}/spam-reports/... and POST /api/mail/report.

Reporting spam and phishing

On an open message, or on ticked ones, Report spam and Report phishing send a copy to the team's administrators and move the message to Junk (which also teaches the filter). Reporting works without Rspamd too.

Reports appear:

For each report you can:

Each report keeps the reporter, the sender, the subject, the spam score and the Authentication-Results header the message arrived with. A user can make 200 reports a day. From the command line: corpsuite tenant reports acme, tenant report quarantine acme ID, tenant report set acme ID status=resolved and spam reports for every tenant.