Skip to main content
WisMail

Tune Anti-Spam Without Losing Real Mail

Spam filtering is a balance. Too loose and users drown in junk; too strict and a customer's invoice disappears. WisMail scores every message with SpamAssassin, learns from your own mail with a Bayes filter, and lets you move the thresholds. This guide shows how to tune it safely, for users and for administrators. The overview is on the anti-spam and anti-virus feature page.

Anti-spam reduces spam; it cannot remove it all, and no filter is perfect. Make small changes and check the effect before the next one.

For users

1. Check the Spam folder

Open the Spam folder in webmail once a day for the first week. Spam goes there when Deliver spam messages to the Spam folder is on in Settings, Spam. Real mail in the folder is a false positive worth fixing.

2. Teach the filter: Mark as Spam and Not Spam

  • Unwanted message in your Inbox: select it and click Mark as Spam. The message moves to the Spam folder and the server learns from it.
  • Real message in the Spam folder: click Not Spam (or move it back to the Inbox). This teaches the filter that mail like this is good.

Moving a message into or out of the junk folder counts as a vote in the same way. The more your users do this, the better the Bayes filter fits your organisation.

3. Trust senders

In Settings, Spam you can build a whitelist so mail from the people you work with is never treated as spam:

  • Tick Trust senders from my Contact folder.
  • Tick Add the email address of the original sender while sending a reply, so people you answer are trusted automatically.
  • Use Add whitelist rule for one address or a pattern such as *@customer.com.
Webmail Settings: out of office, signature, delegation and spam options

Images from other websites stay hidden until you click Display images; opening them in spam can bring more spam. Do not turn this off for everyone.

For administrators

Open https://<server-name>:4040/admin, Configuration, Content Filter, Spam Filter.

5. Read the score of a message

SpamAssassin adds headers to every scored message: X-Spam-Status, X-Spam-Level and X-Spam-Flag. In webmail use View Source on a message, or in your mail client show the full headers. A higher score means a higher probability of spam. The Logs, Spam log shows what the filter decided and every time a user marked a message as spam or not spam, with sender and subject.

6. Adjust the thresholds

Make sure Enable spam rating is ticked, then use the two limits:

  • Tag score: a message at or above it is treated as spam. You can prefix the message's Subject with text such as [SPAM], so users see it in any client.
  • Block score: a message at or above it is rejected or handled by the block action: send a bounce message to the sender, or forward the message to the quarantine address. A higher score indicates a higher probability of spam; setting the value to 10 disables blocking.

Change one threshold by one point at a time, wait a day, then check the Spam log and ask users about missed or wrong decisions. Too many false positives: raise the tag score. Too much spam in the Inbox: lower it.

Web administration: spam filter with tag and block scores

7. Use quarantine for the uncertain zone

Create a normal mailbox such as [email protected] and enter it as the quarantine address for the block action. Messages with a very high score then go there instead of the sender's bounce. Ask one person to review it every day for the first weeks. Forward real messages to the recipient and mark them as not spam. If nothing real ever turns up, you can raise your confidence and lower the block score.

8. Bayes learning

Tick Use spam learning Bayesian filter. Bayes needs examples of both spam and good mail before it contributes, so let users mark mail for a few weeks. The setting Filter contribution with Bayes controls how much the Bayes result counts in the overall score.

9. Greylisting and delay

On the same screen greylisting temporarily defers mail from unknown senders. Legitimate servers retry and get in a few minutes later; many bulk senders do not. Expect a short delay for the first message from a new sender. Add the addresses of partners you cannot afford to delay to the greylisting exceptions. Delay SMTP greeting (the spam-robot repellent) holds the greeting for a few seconds, because spam robots often disconnect before it arrives.

10. Blacklists and IP lists

Enable Internet blacklists (DNSBL) to look up the sending IP address in DNS blocklists. Use the Custom whitelist (never checked) for trusted IP address groups such as your own gateway or a partner, and the Custom blacklist for sources you want blocked. The SPF and DKIM checks on incoming mail also help against forged senders. DMARC policy is not evaluated by the server; see DKIM, SPF and DMARC.

11. Virus scanning

ClamAV virus scanning and the attachment filter are on separate tabs (Antivirus, Attachment Filter). ClamAV is optional and is not installed with the package; install clamav-daemon and clamav-freshclam to enable it and plan about 1 GB of RAM. The attachment filter blocks risky file types such as executables.

12. Keep it running

Spam scoring and virus-signature updates are part of the subscription. If the subscription expires they switch off until you renew; see license activation.

Troubleshooting

  • A customer says mail never arrived. Search Logs, Mail and Logs, Spam for the sender. If it was blocked, add the sender to the whitelist and check why the score was high (often missing SPF/DKIM at their side).
  • Newsletters land in the Inbox. Mark them as spam a few times; Bayes learns. Add a message rule only for rules you control.
  • Spam still arrives after tuning. Lower the tag score by one point, check that Bayes is on and has learnt mail, and make sure your DNS (SPF, DKIM, PTR) is correct so your own mail does not look like spam to others.

Next steps