Hi, I'm trying to restrict emails from my account (mydomain.com) and only allow users email addresses at mydomain.com and myotherdomain.com, with the exception of users john and david ..
I've tried the code below with no luck, all emails fail !?
I'm new to this and this is my first attempt so I apologise if I'm way off !
Any help would be appreciated, thanks.
I've tried the code below with no luck, all emails fail !?
I'm new to this and this is my first attempt so I apologise if I'm way off !
Any help would be appreciated, thanks.
Code:
if first_delivery
and ("$h_from:" contains "@mydomain.com")
and ("$h_from:" does not contain "[email protected]" or "$h_from:" does not contain "[email protected]")
and ("$h_to:, $h_cc:" does not contain "@mydomain.com" or "$h_to:, $h_cc:" does not contain "@myotherdomain.com")
then
fail "Cannot send to this recipient."
endif