Exim Filter Rule

bymizah

New member
Joined
Oct 4, 2022
Messages
3
I want to create a filter for exim.

if(recipient_domain=="abc.com" and sender_ipadress!="185.85.20.84"){
reject
}

Help needed for rule I need to write in /etc/system_filter.exim
 
There's an easier way to do this:

Code:
echo "185.85.20.84" >> /etc/virtual/bad_sender_hosts_ip
 
I created a rule like below, but I need to add one more condition to this rule.
how can i run this rule only for incoming mails

Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "@abc.com" and $message_headers does not contains "185.85.20.84" and $sender_address does not contains "@abc.com")
then
seen finish
endif
 
I don't know. But much easier. If abc.com would do a little bit of work and use SPF and DKIM (and maybe DMARC) you wouldn't have to adjust all kind of things to block fake users of that domain from your system.
 
The important thing here is that this rule only works for incoming e-mails. So I should say if $domain is not in /etc/virtual/domains folder
 
Back
Top