Published on: 02/09/2023 | Updated on: 12/07/2023 | Reading Time: 4 minutes
DirectAdmin SpamAssassin Setup
Difficulty Level: Medium
In order to configure SpamAssassin, begin by logging in to your DirectAdmin control panel
Navigate to the E-Mail Manager section and click Spamassassin Setup
Search
The DirectAdmin Search function works very well and makes it very easy to locate the SpamAssassin Setup page. Type Spam in the search bar and the link to the Spam Assassin Setup page will appear.
DirectAdmin Email Manager Section
If SpamAssassin is not enabled you will need to enable it before seeing the screen shown below.
The screenshot below shows all available options
DirectAdmin SpamAssassin Setup Screenshot
Basic Configuration
Blocking Strategy - Where should the spam go?
Inbox
Do not block spam e-mails. All incoming messages would go to inbox
Main Spambox
Redirect it to the catch-all spam folder in your main IMAP account
User Spambox
Send the spam to the user’s spam folder
Delete
Remove the spam from the server automatically
High Score Block - Would you like to delete high scoring spam?
No
Do not block high scoring spam. Use only global threshold
Yes
Block all spam scoring higher than custom high-score threshold
All emails scored higher than high-score threshold would be deleted automatically. Enter a number between 1 and 50 (no decimals). 15 is the default value.
Remember to save your changes
Advanced Configuration
Global threshold - What score threshold do you wish to use?
Low (5.0)
A lower threshold will block more spam, but can potentially tag legitimate mail.
Medium (10.0)
Increased probability to pass spam.
High (15.0)
A higher threshold will let more spam through, but is less likely to tag legitimate mail.
Custom
A custom threshold will let you set finer control over what is considered spam.
Rewrite subject - Do you wish to rewrite the subject of a spam e-mail?
No
Leave the subject unchanged
Yes
Set the subject to the following (Custom subject would be prepended to the original)
Default value is *****SPAM*****
Spam delivery - How should the spam be delivered?
Don’t use attachments
Incoming spam is only modified by adding some X-Spam- headers and no changes will be made to the body. In addition, a header named X-Spam-Report will be added to spam
Use attachments
If an incoming message is tagged as spam, instead of modifying the original message, SpamAssassin will create a new report message and attach the original message as a message/rfc822 MIME part (ensuring the original message is completely preserved, not easily opened, and easier to recover).
Use text-attachments
Original messages will be attached with a content type of text/plain instead of message/rfc822. This setting may be required for safety reasons on certain broken mail clients that automatically load attachments without any action by the user. This setting may also make it somewhat more difficult to extract or view the original message
Remember to save your changes
Blacklisted E-mails
This is the list of e-mail address that will be blocked. Any e-mail from these addresses will automatically be tagged as spam.
Type in an email address or block an entire domain by typing in *@the-domain.com (replace the-domain.com with the actual domain you wish to block) and press Enter
Whitelisted E-mails
This is the list of e-mail address that will be allowed. Any e-mail from these addresses will automatically be tagged as non-spam.
Type in an email address or whitelist (allow) an entire domain by typing in *@the-domain.com (replace the-domain.com with the actual domain you wish to block) and press Enter
Bayes Data
The Bayesian classifier in Spamassassin tries to identify spam by looking at what are called tokens; words or short character sequences that are commonly found in spam or ham.
This button will remove data learned by SpamAssassin. It will free up some space, but will reset any learned progress SpamAssassin has previously made.