Restricting specific email accounts to send email within their domain.
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 "user@example.tld" && "$h_to:" does not contain "*@example.tld")
then fail
endif
==
-
This would work to restrict user@example.tld to only email within example.tld though I would use equals instead of contains for the h_from portion. 0 -
I have the requirement. want to limit some accounts only send/receive internal email, others can work normal. Where do I need put the script? 0 -
Apparently there is a loophole with this approach. Loophole is if i include any other email recipient in to, cc or bcc along with a user from domain.com then this filter fall apart and doesn't work. Ex: my email message contains following users to: user2@domain.com cc: user3@domain.com; sample.user@gmail.com 0
Please sign in to leave a comment.
Comments
3 comments