How to restrict an email account from sending emails outside domain ?
I am trying to create a filter where 1 email account is not permitted to send emails outside of its domain. I have tried following script but it has some loopholes.
if $sender_address is "user1@domain.com"
and ("$h_to:, $h_cc:, $h_bcc:" does not contain "@domain.com")
then
fail text "Sorry one or more of your email recipients is not allowed. Please contact your System Administrator."
finish
endif
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
is there a workaround which i can try ?
Your help is much appreciated.
TIA
-
Hey there, There is a similar forum post here, Can you review this and let us know if you continue to have issues with your filter? 0 -
Cpanel filters only work on inbound mail. 0 -
Cpanel filters only work on inbound mail.
Hi, that is not true they do work on outbound emails as well, in past had created an auto-bcc rule for a client on outbound emails0
Please sign in to leave a comment.
Comments
4 comments