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!

Make global filter under cPanel account?

Discussion in 'E-mail Discussion' started by VMunich, Aug 8, 2018.

Tags:
  1. VMunich

    VMunich Member

    Joined:
    May 27, 2015
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Boston
    cPanel Access Level:
    DataCenter Provider
    Hi, I'd like to make a global filter, to put all emails containing `****SPAM****` in the Junk folder.

    This works fine if I make an email filter, but then I need to make an individual filter for each email account:

    Code:
    headers charset "UTF-8"
    if not first_delivery and error_message then finish endif
    #X-MagicSpam-Spam-Global
    if
     $message_headers contains "X-MagicSpam-Spam"
    then
     deliver "\"$local_part+Junk\"@$domain"
    endif
    
    However, if I turn this same filter into a global filter, it doesn't work. Exim's logs return this:

    Code:
    testing+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+junk+Junk@domain.tdl
    
    In my global filter, if I do logwrite ${local_part}\+Junk\@${domain}, it returns the intended email account, testing+Junk@domain.tdl, but when the filter runs deliver ${local_part}\+Junk\@${domain}, $local_part loops +junk+ over and over and my log overflows.

    What am I doing wrong? I've been looking at EXIM's documentation and trying to get this to work, but I always end up in the same outcome.

    I appreciate any help, thanks
     
    #1 VMunich, Aug 8, 2018
    Last edited by a moderator: Aug 8, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,827
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @VMunich,

    Is there any reason you prefer not to use the SpamBox feature that's included with cPanel & WHM? It's documented at:

    Spam Filters - Version 74 Documentation - cPanel Documentation

    Also, note the following information from the cPanel & WHM version 74 Release Notes:

    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