Answer the question
In order to leave comments, you need to log in
How to prevent exim from sending emails to yahoo, hotmail, etc.?
Unfortunately, I often encounter spam and it is not always possible to prevent the mailing of letters from hacked sites in time, which subsequently causes IPs to be blacklisted.
Tell me, what should be created correctly in the Exim mail system so that mailing via smtp and php mail cannot reach certain recipients, for example, yahoo.com, hotmail, etc.
Answer the question
In order to leave comments, you need to log in
In the dnslookup router or which one you use for external connection (for example, I have smarthost), add a line like this:
in the main section, write
This will prevent routing to unwanted domains
. You can additionally set it in the acl section:
acl_not_smtp:
drop
condition = ${if forany{<, $recipients}\
{bool{${lookup{${domain:$item}}lsearch{/etc/exim4/unwanted_domains}{1}{0}}}}}
message = not allowed
accept
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question