Introduction
When using Spam Filters on your cPanel account, it is possible to 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
** Warning, these steps include modifying the 'local.cf' file for SpamAssassin installed for your cPanel server. Please use caution. **
1. Determine what email address or domain you need to whitelist through SpamAssassin that is being relayed.
We will use the following information as our example for this support article.
cptest@domain.tld -- email address
mail2.domain.tld -- PTR (rDNS) address of mail server
2. Review the SpamAssassin page below for the two following entries:
https://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html
Options:
whitelist_from_rcvd
whitelist_allows_relays
Brief Explanation:
The 'whitelist_from_rcvd' needs two parameters, the email address or domain and the rDNS record of the mail server
The 'whitelist_allows_relays' needs the email address or domain to ensure it is not triggered by a Spamassassin rule
Below is an example from our test domain:
whitelist_from_rcvd cptest@domain.tld mail2.domain.tld
whitelist_allows_relays cptest@domain.tld
3. In the SpamAssassin documentation URL, a more robust explanation is given for the two options. We recommend reviewing them closely before proceeding.
4. 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 by command-line. You will need to SSH into the cPanel account or use the 'Terminal' Feature to reach the file.
File Location:
/etc/mail/spamassassin/local.cf
Please backup the file before modifying the file, just in case.
5. Add the new configurations from Step 2 to the bottom of the file, and save the file.
6. No need to restart Exim, Dovecot, or Spamassassin.
Comments
0 comments
Article is closed for comments.