Exim custom filtering of email

Nick Tang

Registered
Jun 8, 2018
1
0
1
Malaysia
cPanel Access Level
DataCenter Provider
Hi,

My customer would like to block senders' email to reach certain domain names that sit within the same server. I had written the following codes to the exim filter.

or ("$h_to:, $h_cc:" contains "@abc.com")
or ("$h_to:, $h_cc:" contains "@erf.com")
then
fail text "This email address is no longer exist."
seen finish
endif

It works at charm. But the code above cause the senders' email that was suppose to send to zzz.com got filtered too because the email was sending to abc.com both attention TO: zzz.com and abc.com

Any idea how to get the email send to zzz.com but not abc.com?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,917
2,248
363