Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED SpamAssassin or other means of whitelisting by TO address?

Discussion in 'E-mail Discussion' started by JJ Johnson, Jun 28, 2018.

Tags:
  1. JJ Johnson

    JJ Johnson Member

    Joined:
    Jun 28, 2018
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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?
     
    #1 JJ Johnson, Jun 28, 2018
    Last edited by a moderator: Jun 29, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. JJ Johnson

    JJ Johnson Member

    Joined:
    Jun 28, 2018
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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?
     
  4. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    293
    Likes Received:
    24
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    You can edit in your account folder:

    .spamassassin/user_prefs

    add:

    whitelist_to email@address.com

    Even though it won't show in the user interface, it will be preserved.
     
    cPanelMichael likes this.
  5. JJ Johnson

    JJ Johnson Member

    Joined:
    Jun 28, 2018
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    Thank you. I think that just might work. After editing the file by hand, I made sure that it survived changes made in the web interface, and it did.

    :)
     
    cPanelMichael likes this.
  6. MikeKM

    MikeKM Registered

    Joined:
    Jan 22, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PA
    cPanel Access Level:
    Website Owner
    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?
     
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. JJ Johnson

    JJ Johnson Member

    Joined:
    Jun 28, 2018
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    Damnit. That explains why I've begun seeing these mailing list messages classified as spam once again.
     
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice