Last updated

Mailcow

Mailcow Anti-Spam Tuning

Tune Mailcow’s Rspamd anti-spam engine to reduce false positives and catch more spam.

Contents

  1. Access Rspamd Web UI
  2. Tune Spam Score Thresholds
  3. Whitelist a Sender
  4. Train Spam/Ham Filters
  5. Check Greylisting

Tune Rspamd and greylisting to reduce spam on your Mailcow mail server.

Access Rspamd Web UI

Navigate to https://mail.yourdomain.com/rspamd. Login with the password in mailcow.conf (RSPAMD_PASSWORD).

Tune Spam Score Thresholds

# Edit Rspamd actions config
sudo nano /opt/mailcow-dockerized/data/conf/rspamd/override.d/actions.conf
actions {
  reject = 15;
  add_header = 6;
  greylist = 4;
}

Whitelist a Sender

# Add to whitelist
echo "trusted@example.com" >> /opt/mailcow-dockerized/data/conf/rspamd/custom/whitelist_sender.map
docker compose exec rspamd-mailcow rspamadm reload

Train Spam/Ham Filters

Use the Rspamd web UI to train the Bayes filter by marking messages as spam or ham. This improves accuracy over time.

Check Greylisting

# View greylist status
docker compose exec rspamd-mailcow rspamadm greylisting -l

FAQ

Which spam filter does Mailcow use?

Rspamd. You can tune scores, train it with spam and ham, and manage lists in the Mailcow UI.

Legit mail is going to spam. What do I check?

The sender's SPF, DKIM and DMARC, the Rspamd score in the message headers, and add a per-domain allow list if needed.