How to restrict exim accept mails for one domain from certain hostname?

ozgurerdogan

Verified User
Joined
Apr 20, 2008
Messages
343
I have setup proxmox mail gateway in front of exim with many domains. But only some domains in exim are enabled for mail gateway. But sometimes, those domains recieve spam mails bypassing mail gateway. Because spammers are directly deliverying mails to exim ip.

So I need to set a rule in exim-filter (I think), to accept mails from only mailgateway hostname and reject the rest. But must be able to be done per domain basis.

Can you guide me?
 
There are 2 files for this.
You can use:
/etc/virtual/bad_sender_hosts /etc/virtual/bad_sender_hosts_ip

There is a small issue with the bad_sender_hosts_ip which is not checked by Exim in time.
That is fixed by exim.conf version 4.5.43 which is present at files1, but is not released official yet.

You can also manually fix that for the time being, this is the fix:
 
Back
Top