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.

Outgoing email filter

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

Tags:
  1. Ali Hamra

    Ali Hamra Registered

    Joined:
    May 26, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Amman
    cPanel Access Level:
    Root Administrator
    Hello,
    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 -> @mydomain.com
    or
    To -> Does not end with -> @mydomain.com

    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 ?
    Thanks.
     
  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,

    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.

    Thanks!
     
Loading...

Share This Page