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 yourself 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: Every incoming email is analyzed for spam characteristics
  2. Scoring: The email receives a score (the higher, the more likely it's 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 common 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'll arrive at the main dashboard

Step 2: Navigate to SpamAssassin

  1. Find Email or Email Manager in the menu
  2. Click on SpamAssassin Setup or Spam Filters
  3. You'll see the SpamAssassin configuration page

Step 3: Activate SpamAssassin

  1. Set the switch to Enabled or check Enable SpamAssassin
  2. Click Save
  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 lots of spam
3.0 Very sensitive Extreme spam problems
7.0 Less sensitive Many false positives
10.0 Minimal Only obvious spam

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

Setting spam action

You can choose what happens with spam:

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

Note: With "Delete" you permanently lose emails. Use this only if you're certain.

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 subject
header LOCAL_SPAM_SUBJECT Subject =~ /free|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'll now receive details about why emails were marked as spam

Troubleshooting common problems

Legitimate emails marked as spam (false positives)

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

Spam still getting 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 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 conservative: 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 automatically updated
  5. Combine with other measures: Also use SPF, DKIM, and DMARC

Need help?

We're here for you! Running into issues or have questions? Our support team is happy to help you personally. Drop us a message through the ticket system - we usually respond within a few hours and love helping you find the best solution.