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.

block from sending email to external domains

Discussion in 'E-mail Discussions' started by tcdrake, Apr 4, 2011.

  1. tcdrake

    tcdrake Registered

    Joined:
    Apr 4, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to setup a filter rule to deny users from emailing outside of the company domain. I believe I have the filter set correctly. When I test within cPanel it shows it is working but when I try it via webmail the emails are delivered. Below is the simple filter I have in place.

    aaa.com is the company domain
    zzz.com is all external domains

    Rule
    Any recipient does not contain aaa.com
    Fail with message "Denied"

    Test results from within cPanel filter section.

    e Filter has matched the following condition(s):
    foranyaddress $h_to:,$h_cc:,$h_bcc: ($thisaddress does not contain aaa.com)
    $thisaddress does not contain aaa.com

    Extracted address test@zzz.com
    Return-path copied from sender
    Sender = myaccount@aaa.com
    Recipient = myaccount@aaa.com
    Testing Exim filter file "/etc/vfilters/aaa.com"

    Fail text "Denied"
    Filtering ended by "fail".


    Like I said, the above test works but if I try sending an email via webmail they are delivered without being denied. Any ideas on what I am missing here?
     
  2. tcdrake

    tcdrake Registered

    Joined:
    Apr 4, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I'm being told by my hosting provider that the cPanel filtering doesn't work on outgoing emails only incoming. Can someone confirm this for me? If this is true does anyone have any suggestion on what I can do besides setup an email server onsite?

    Thanks!
     
Loading...

Share This Page