SpamAssassin is a powerful spam filter that keeps unwanted emails out of your inbox. In this guide, we explain how to configure SpamAssassin in DirectAdmin to protect you from spam.

What is SpamAssassin?

SpamAssassin is an open-source spam filter that analyzes emails and assigns a score based on various criteria. Emails with a high score are marked as spam or automatically deleted. The system learns from your preferences and becomes increasingly effective.

How does SpamAssassin work?

  1. Analysis: Each incoming email is analyzed for spam characteristics
  2. Scoring: The email receives a score (the higher, the more likely it is to be spam)
  3. Action: Based on the threshold, action is taken
  4. Learning: The system learns from corrections you make

Examples of spam indicators

  • Suspicious subject line (ALL CAPS, many exclamation marks)
  • Unknown senders
  • Links to suspicious websites
  • Certain words and phrases commonly found in spam
  • Poor HTML formatting
  • Hidden text

Enabling SpamAssassin

Step 1: Log in to DirectAdmin

  1. Go to the DirectAdmin login portal
  2. Log in with your username and password
  3. You will arrive at the main dashboard

Step 2: Navigate to SpamAssassin

  1. Look for **Email** or **Email Manager** in the menu
  2. Click on **SpamAssassin Setup** or **Spam Filters**
  3. You will now see the SpamAssassin configuration page

Step 3: Activate SpamAssassin

  1. Toggle the switch to **Enabled** or check **Enable SpamAssassin**
  2. Click **Save** or **Opslaan**
  3. SpamAssassin is now active for your account

Configuring SpamAssassin

Setting the threshold

The threshold determines when an email is considered spam:

Score Sensitivity Recommended for
5.0 Standard Most users
4.0 Sensitive Receiving a lot of spam
3.0 Very sensitive Extreme spam problems
7.0 Less sensitive Many false positives
10.0 Minimal Only clear spam

Recommendation: Start with the default value of 5.0 and adjust as needed.

Setting actions for spam

You can choose what happens to spam:

  1. Mark: Email gets [SPAM] in the subject line
  2. Move: Email goes to the spam folder
  3. Delete: Email is automatically deleted

Note: With "Delete," you will permanently lose emails. Use this only if you are sure.

Whitelist and Blacklist

Whitelist (always allow):

  • Email addresses that are never marked as spam
  • Useful for important contacts
  • Add: `friend@example.com` or `*@trustedcompany.com`

Blacklist (always block):

  • Email addresses that are always blocked
  • Useful for known spammers
  • Add: `spammer@example.com` or `*@spamdomain.com`

Advanced settings

Adding custom rules

You can add your own rules for better filtering:

# Block emails with certain words in the subject
header LOCAL_SPAM_SUBJECT Subject =~ /gratis|winner|lottery/i
score LOCAL_SPAM_SUBJECT 5.0

# Block specific senders
blacklist_from *@spamdomain.com

Enabling reporting

  1. Go to SpamAssassin settings
  2. Check **Spam Report**
  3. You will now receive details on why emails are marked as spam

Troubleshooting common issues

Legitimate emails are marked as spam (false positives)

  1. Whitelist the sender: Add the email address to your whitelist
  2. Lower the sensitivity: Increase the threshold (e.g., from 5.0 to 6.0)
  3. Train SpamAssassin: Mark the email as "Not spam"

Spam still gets through

  1. Increase sensitivity: Lower the threshold (e.g., from 5.0 to 4.0)
  2. Blacklist senders: Add known spammers to the blacklist
  3. Check if SpamAssassin is active: Sometimes it gets accidentally disabled

SpamAssassin is not working

  • Check if SpamAssassin is enabled
  • Wait 15-30 minutes after activation
  • Check if your email client shows the spam folder

Tips for effective spam filtering

  1. Start conservatively: Begin with default settings and adjust later
  2. Check your spam folder: Regularly check for false positives
  3. Train the system: Mark correct and incorrect classifications
  4. Update regularly: SpamAssassin rules are updated automatically
  5. Combine with other measures: Also use SPF, DKIM, and DMARC

Need help?

We are here for you! Are you facing any issues or have questions? Our support team is happy to assist you personally. Send us a message via the ticket system - we usually respond within a few hours and are eager to help.