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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SpamAssassin "Do not forward mail to external recipients"

Discussion in 'E-mail Discussions' started by Erik Stackhouse, Jun 6, 2017.

Tags:
  1. Erik Stackhouse

    Erik Stackhouse Registered

    Joined:
    Jun 6, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Massachusetts
    cPanel Access Level:
    Root Administrator
    Hello,

    I've got SpamAssassin configured and working very well, but I've discovered an issue that I can't seem to resolve with the setting:

    "Do not forward mail to external recipients if it matches the Apache SpamAssassin™ internal spam_score setting" set to "On".

    All accounts are configured with the Spam Box via /home/[user]/.spamassassinboxenable

    Which is working great for all non-forwarded mail accounts.

    However, for the mail accounts with an actual mailbox, if they also have a forwarder (i.e. store and forward) the spam messages are simply blocked (with a bounce message) and are not saved in the spam folder.

    Is there a way to tell SpamAssassin/exim that I want it to store the spam in the spam box, even if the email account is set to forward to an external address. The fact that it doesn't forward the spam is good, but I'd still like it to save the messages. In other words, I want it to not forward the spam, but still store the spam locally.

    Ideally, I'd like to be able to save spam messages even for forward-only mail accounts that don't have an actual mailbox, perhaps in the default mail account? That's less important, since I can always set up actual mail accounts for the current forward-only accounts.

    My server runs WHM/cPanel 64 (build 24)

    Thanks!

    -Erik
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's possible this relates to an existing internal case (CPANEL-6571). Could you verify if a double forwarder is configured for the affected email account? For example:

    Code:
    user1@domain.tld forwards to user2@domain.tld
    user2@domain.tld forwards to remote-user@remote-domain.tld
    Thank you.
     
  3. Erik Stackhouse

    Erik Stackhouse Registered

    Joined:
    Jun 6, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Massachusetts
    cPanel Access Level:
    Root Administrator
    Thanks for getting back to me. I don't think I have any mail accounts configured that way. It's a case of a mail user having an actual account, e.g.:

    user1@domain.tld

    AND also having a forwarder set up:

    user1@domain.tld forwards to: remote-user@remote-domain.tld

    when the setting for "Do not forward mail to external recipients if it matches the Apache SpamAssassin™ internal spam_score setting" is set to "On" -- nothing goes into the spam box. If I turn that setting off, then spam starts getting stored in the spam box.

    Thanks Again,

    -Erik
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I believe this is a separate issue from CPANEL-6571. Could you open a support ticket using the link in my signature so we can take a closer look and see what's happening? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. Erik Stackhouse

    Erik Stackhouse Registered

    Joined:
    Jun 6, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Massachusetts
    cPanel Access Level:
    Root Administrator
    Okay, I opened a ticket: 8569599

    Thanks!
     
  6. Erik Stackhouse

    Erik Stackhouse Registered

    Joined:
    Jun 6, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Massachusetts
    cPanel Access Level:
    Root Administrator
    Hello,

    The technician that handled my ticket suggested that I remove the forwarder and create a filter, and I found that indeed, if I remove the forwarder, and create two filters, one that saves the message to the inbox, and another that redirects it to the address I want to forward to, it works exactly as I want. The spam is not forwarded, but it is still saved on the server, so it can be examined.

    I can find all the accounts set up this way in /etc/valiases, comparing with actual mailboxes, but I'm having trouble locating where the account level email filters are saved on disk. I looked in /etc/vfilters -- but they're not there! I guess that's only for global filters? Where are the account-level filters stored? They've gotta be somewhere...

    Thanks.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello Erik,

    Filters for individual email accounts are stored in the following directory:

    /home/$username/etc/$domain/$email-account/

    Thank you.
     
Loading...

Share This Page