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!

Deny user to send email for specific domain

Discussion in 'E-mail Discussion' started by roliks94, Apr 24, 2019.

  1. roliks94

    roliks94 Registered

    Joined:
    Feb 27, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Hello!

    Does anybody have a ready-made example or a similarly designed filter to block certain users who are very much, to deny access to emails to specific domains? Can anyone help with this?
     
  2. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,265
    Likes Received:
    86
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    Your question doesn't make sense.
    Could you elaborate please.
     
  3. roliks94

    roliks94 Registered

    Joined:
    Feb 27, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    I
    Okay. I will try to example you. I have 100 users with emails example@domain.com and example1@domain.com etc. I need them to block outgoing e-mails to specification domain like @yahoo.com and @google.com

    And the question is what I need to write in the config to do this? The best way to be if all email senders write to file, and then make a config which allow doing this.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,161
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. roliks94

    roliks94 Registered

    Joined:
    Feb 27, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    Yea but, if I have many email addresses and I want them to write to one file with name examples like restricted emails because I don't want to create so many rules, for each email address. Where did I need to write on this example which is in below text, that email addresses need to check from the created restricted file which I made? And where I need to create this file in which directory?

    # cat /usr/local/cpanel/etc/exim/sysfilter/options/test
    if("$h_to:, $h_cc:, $h_bcc:" contains "gmail.com")
    and ("$header_from:" contains "myuser@mydomain.com")
    then fail
    endif
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,161
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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