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!

Outgoing email filter

Discussion in 'E-mail Discussion' started by Ali Hamra, May 26, 2017.

  1. Ali Hamra

    Ali Hamra Registered

    May 26, 2017
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    I have created multiple of email accounts via cPanel and what i am willing to do is that i want to assign two of the created e-mails to only send and receive e-mails from the same domain name and discarding any e-mails either outgoing or incoming that does not match the domain name assigned.
    I went through the E-mail filter and created many rules, as an example of outgoing :
    To -> Does not contain ->
    To -> Does not end with ->

    No matter what rule i create, it always pass these conditions and the user can easily send e-mails without be notified that this action is not allowed.

    However, i can assure that incoming mails works fine as needed, but as for outgoing only problem occurs.
    Also I've used "Filer Test" and the result is a success for both ways ! But accessing Webmail ( roundcube or horde ) the problem occurs.

    Am i missing something here ?
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Email filters that you configure in cPanel only apply to incoming email. You'd need to configure a system filter rule for Exim (this requires root access to the server) if you want to filter outgoing email. Here's a document that explains how to setup a system filter rule:

    How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation

    You'd have to ensure the rule included a "FROM" and "TO" option to ensure it only applies to specific email accounts.

    Let us know if you have any questions.

    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