Here we cover the steps to whitelist or blacklist an email address or domain globally for incoming or outgoing email via the command line on your VPS or dedicated server.
Apache SpamAssassin is one of the most powerful open-source email filtering systems available. While this spam filtering can be a huge help in managing unwanted junk emails, it can be a major hindrance when it starts blocking legitimate emails.
While you can whitelist or blacklist email addresses and domains for incoming emails in cPanel, you may find that you need to allow or block an external sender across your entire server, or you might need to whitelist your own email address for outbound emails.
Related Articles
How to SSH into VPS or Dedicated Servers
Enable Spam Filters
Whitelist Email Address with SpamAssassin
Blacklist Email or Domain with SpamAssassin
Change SpamAssassin Spam Threshold Score
Log into Root WHM Using AMP
Whitelist
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
- Access the server via SSH as the root user or using the Terminal in Root WHM
- Open the following file in your preferred text editor (vim, nano, etc.)
/etc/mail/spamassassin/local.cf
- Add the following to the end of the file
whitelist_from user@domain.com
REPLACE: user@domain.com with the email address you want to whitelist. - Save the file and exit the text editor
- Restart spamd by running the following command
service spamd restart
Blacklist
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
- Access the server via SSH as the root user, or using the Terminal in Root WHM
- Open the following file in your preferred text editor (vim, nano, etc.)
/etc/mail/spamassassin/local.cf
- Add the following to the end of the file
blacklist_from user@domain.com
REPLACE: user@domain.com with the email address you want to whitelist. - Save the file and exit the text editor
- Restart spamd by running the following command
service spamd restart
Comments
0 comments
Article is closed for comments.