Restricting specific email accounts to send email within their domain.

tabzali

Registered
Jul 11, 2019
1
0
1
Pakistan
cPanel Access Level
Root Administrator
Hello Team Cpanel,

I have been following all the threads for the answer for my subject line but seems like we have been redirected to cpanel documents for this.

Well I have read those too, can you please let me know if the below mentioned configuration is right?
==
if ("$h_from:" contains "[email protected]" && "$h_to:" does not contain "*@example.tld")
then fail
endif
==
 
Last edited by a moderator:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,814
541
263
Houston
cPanel Access Level
DataCenter Provider
This would work to restrict [email protected] to only email within example.tld though I would use equals instead of contains for the h_from portion.