Deny user to send email for specific domain

roliks94

Registered
Feb 27, 2019
4
0
1
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?
 

roliks94

Registered
Feb 27, 2019
4
0
1
Latvia
cPanel Access Level
Root Administrator
I
Your question doesn't make sense.
Could you elaborate please.
Okay. I will try to example you. I have 100 users with emails [email protected] and [email protected] 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.
 

roliks94

Registered
Feb 27, 2019
4
0
1
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 "[email protected]")
then fail
endif
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston