· 8 years ago · Mar 27, 2018, 05:44 PM
1# Exim filter
2#
3# test1 & test2 are not restricted
4# test3 & test4 are restricted to @outlook.com and @gmail.com, i.e. cannot send to any other domain
5
6# these email addresses are not restricted
7if $sender_address is "test1@mydomain.com" or $sender_address is "test2@mydomain.com"
8then
9 finish
10endif
11
12if $sender_address_domain is "mydomain.com" and ("$h_to:, $h_cc:, $h_bcc:" does not contain "@outlook.com" and "$h_to:, $h_cc:, $h_bcc:" does not contain "@gmail.com")
13then
14 fail text "Sorry one or more of your email recipients is not allowed."
15 finish
16endif