Results 1 to 2 of 2

Thread: block from sending email to external domains

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Question block from sending email to external domains

    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. #2
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Default Re: block from sending email to external domains

    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!

Similar Threads

  1. How Do I Block One Domain From Sending Email From My Server?
    By ambition13 in forum cPanel & WHM Discussions
    Replies: 21
    Last Post: 09-08-2012, 03:45 PM
  2. Replies: 1
    Last Post: 08-28-2011, 05:44 PM
  3. Block Subdomain from Sending Email
    By authorinet in forum E-mail Discussions
    Replies: 0
    Last Post: 02-25-2011, 09:14 AM
  4. email sending but not being received by one block of addresses
    By swisslyons in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 12-29-2005, 05:01 AM
  5. How to block apache from sending out email
    By vishwas in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 03-07-2005, 02:45 AM