Introduction
When using Spam Filters on your cPanel account, you can whitelist certain email addresses so SpamAssassin does not interfere with them. However, if an email is relayed through the server, SpamAssassin will not know what domain it comes from, preventing it from being whitelisted.
If you need to whitelist a relayed email address or domain, you will need to modify the 'user_prefs' file found inside the cPanel account.
Procedure
These steps include modifying the 'local.cf' file for SpamAssassin installed for your cPanel server. Please use with caution.
- Determine what email address or domain you need to whitelist through SpamAssassin that is being relayed.
- Review the SpamAssassin page below for the two following entries:
SpamAssassin Configuration File
Options:
"whitelist_from_rcvd" - The 'whitelist_from_rcvd' needs two parameters. The email address or domain and the rDNS record of the mail server.
"whitelist_allows_relays" - The 'whitelist_allows_relays' needs the email address or domain to ensure it is not triggered by a Spamassassin rule.
Example:whitelist_from_rcvd cptest@domain.tld mail2.domain.tldPlease note that the two options are explained more robustly in the SpamAssassin documentation provided above. We recommend reviewing them closely before proceeding.
whitelist_allows_relays cptest@domain.tld - Once you have the configuration from Step 2, you will need to add it to the bottom of the following file for Spamassassin. Use a text editor like vi or nano to modify the file on the command line. To reach the file, you will need to SSH as the cPanel account user or use the "Terminal" Feature.
File Location:/etc/mail/spamassassin/local.cf
Please also note that we advise backing up the file before making modifications so that changes can be reverted if necessary. - Add the new configurations from Step 2 to the bottom of the file and save it. It is not necessary to restart Exim, Dovecot, or Spamassassin.
Additional Resources
cPanel's SpamAssassin overview
How to whitelist and blacklist e-mail addresses in SpamAssassin
How to Access the Command Line
What are the basic Linux command line/terminal commands to know?
Using Terminal To Access the Command Line
Comments
0 comments
Article is closed for comments.