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.

Restrict Outbound Mail

Discussion in 'E-mail Discussions' started by Virtual World Global, Feb 4, 2017.

  1. Virtual World Global

    Joined:
    Feb 4, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kolkata
    cPanel Access Level:
    Root Administrator
    Hello,

    We have a situation here...

    One of our clients wants to restrict all outbound emails and let his staffs use their email deliveries only within the specific domain...
    What can be done in this regard...please help, As I am new to this forum and don't know how to post a new thread. Please help :)

    --
    Best Regards,
    Budhaditya Mukherjee
     
  2. NOC_Serverpoint

    NOC_Serverpoint Well-Known Member

    Joined:
    Jul 3, 2016
    Messages:
    102
    Likes Received:
    6
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Hi,

    First, in root SSH, run these commands:

    Create a file to add the domain list which you want to restrict.


    vi /etc/restrictdomains

    Add the domains names to which you need to stop the outgoing emails.

    In WHM > Exim Configuration Editor > Advanced Editor , add the following.

    You can use the following acl in exim.conf

    acl_smtp_rcpt = acl_check_rcpt

    deny condition = ${lookup{$sender_address}nwildlsearch{/etc/restrictdomains} {yes}}
    domains = !+local_domains
    acl_check_rcpt:

    deny
    message = The $sender_address is prohibited to send mail to the $domain
    domains = lsearch;/etc/restrictdomains

    Thanks,
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,022
    Likes Received:
    1,276
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The steps on the previous post should help. Let us know if you have any additional questions.

    Thank you.
     
Loading...

Share This Page