SOLVED SpamAssassin or other means of whitelisting by TO address?

JJ Johnson

Member
Jun 28, 2018
5
1
3
US
cPanel Access Level
Website Owner
I'm an end-user with cPanel hosting on a shared server. There's a mailing list that I'm on which is constantly getting messages labeled as spam by SpamAssassin, and I can't figure out how to whitelist them.

The mailing list is hosted by [removed], and for some reason the list admin has configured it so that the FROM address in the headers are those of the list member who sent the message. (I suspect this is also a reason why they're often marked as spam.) The TO address is the address of the mailing list. In cPanel's web interface for creating whitelist rules I only have the ability to create rules by FROM address.

Is there some way I can configure SpamAssassin to whitelist these, or maybe somehow use the global email filters to keep them from going through SpamAssassin?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello @JJ Johnson,

As a website owner, one approach to ensure you receive these emails is to setup a custom email filter using cPanel >> Global Email Filters that forwards these emails to the email address you want to receive them at. Here's an example:

Screen Shot 2018-06-29 at 10.51.41 AM.png

You'd need to replace "MailingListName" to a term or phrase that always appears in messages from that mailing list.

Thank you.
 

JJ Johnson

Member
Jun 28, 2018
5
1
3
US
cPanel Access Level
Website Owner
So it would appear that these global filters are executed after SpamAssassin has evaluated the message and rewritten the headers and subject, correct? If so, forwarding the email isn't going to remove the rewritten SUBJECT containing the prefix of "***SPAM***", which is what I need in order for my mail client to classify them as anything but junk mail.

Is it possible for my hosting provider to create a custom SpamAssassin whitelist rule that filters on the TO address?
 

MikeKM

Registered
Jan 22, 2019
1
0
1
PA
cPanel Access Level
Website Owner
You can edit in your account folder:

.spamassassin/user_prefs

add:

whitelist_to [email protected]

Even though it won't show in the user interface, it will be preserved.
Did cPanel change something? I cannot get our dedicated instance through Lunarpages to respect the whitelist_to line in the user_prefs file. Does it matter where in the file those lines are placed?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Did cPanel change something? I cannot get our dedicated instance through Lunarpages to respect the whitelist_to line in the user_prefs file. Does it matter where in the file those lines are placed?
Hello @MikeKM,

I'm seeing the same behavior when testing this internally. Unfortunately, since the use of whitelist_to isn't a supported SpamAssassin configuration from the user level in cPanel >> Spam Filters, it's not something that we consider a bug. I encourage you to open a feature request for the ability to define a whitelist_to entry from the user level with SpamAssassin:

Submit A Feature Request

You could also frame the request to simply allow one to enable or disable SpamAssassin on a per-email account basis. Let me know the URL once you open it and I'll bring it up with Development to see how feasible it is to support this.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hi @MikeKM,

Could you open a support ticket to report this change in behavior so we can take a closer look and verify if this is functionality we can restore in the product? You can post the ticket number here and I'll link this thread to it.

Thank you.