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!

Exim filter for failed dkim or not in acceptable domain list

Discussion in 'E-mail Discussion' started by jeffschips, Jan 7, 2018.

  1. jeffschips

    jeffschips Well-Known Member

    Jun 5, 2016
    Likes Received:
    Trophy Points:
    new york
    cPanel Access Level:
    Root Administrator
    I wish to create an exim filter (newby here and afraid of touching exim file but will give it a try) which will apply the following rules in the following order:

    1st check) If inbound message not on acceptable domain list dump message into bad-domain folder in user's Roundcube Webmail account.


    2nd. check) If dkim failed dump message into dkim-failed folder in user's Roundcube Webmail folder.

    I see that I can use CPanel account level filtering, but there is no dictionary available that defines these different cases (values) - as well, the sketchy documentation does not state if it searches ALL headers for matches or just the basics like from, to, subject, etc.

    Thank you.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    The following document is a good place to start when setting up filters:

    How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation

    That said, it looks like you are seeking filter rules that are outside the standard behavior (e.g. scanning files for a domain match, creating custom email folders for individual email accounts). These types of rules are unsupported, but you may find some of the examples of the following thread helpful as proof-of-concept:

    Need to filter ALL email

    Or, consider setting up custom SpamAssassin rules instead so you can simply have messages meeting that criteria marked as SPAM (this would allow you to use the native SPAM folder feature and avoid having to develop custom filter rules that create mail folders).

    Note that for DKIM checking, you'd need to make sure the "Allow DKIM verification for incoming messages" option is enabled under the "ACL Options" tab in "WHM >> Exim Configuration Manager >> Basic Editor".

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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