Configure SpamAssassin in DirectAdmin
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?
- Analysis: Every incoming email is analyzed for spam characteristics
- Scoring: The email receives a score (the higher, the more likely it's spam)
- Action: Based on the threshold, action is taken
- 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
- Go to the DirectAdmin login portal
- Log in with your username and password
- You'll arrive at the main dashboard
Step 2: Navigate to SpamAssassin
- Find Email or Email Manager in the menu
- Click on SpamAssassin Setup or Spam Filters
- You'll see the SpamAssassin configuration page
Step 3: Activate SpamAssassin
- Set the switch to Enabled or check Enable SpamAssassin
- Click Save
- 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:
- Mark: Email gets [SPAM] in the subject line
- Move: Email goes to spam folder
- 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.comor*@trustedcompany.com
Blacklist (always block):
- Email addresses that are always blocked
- Useful for known spammers
- Add:
spammer@example.comor*@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
- Go to SpamAssassin settings
- Check Spam Report
- You'll now receive details about why emails were marked as spam
Troubleshooting common problems
Legitimate emails marked as spam (false positives)
- Whitelist the sender: Add the email address to your whitelist
- Lower sensitivity: Increase the threshold (e.g., from 5.0 to 6.0)
- Train SpamAssassin: Mark the email as "Not spam"
Spam still getting through
- Increase sensitivity: Lower the threshold (e.g., from 5.0 to 4.0)
- Blacklist senders: Add known spammers to the blacklist
- 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
- Start conservative: Begin with default settings and adjust later
- Check your spam folder: Regularly check for false positives
- Train the system: Mark correct and incorrect classifications
- Update regularly: SpamAssassin rules are automatically updated
- 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.
0 van 0 vonden dit nuttig