MBF Knowledge Base

How to drop specific hostnames and TLDs in Exim

The local_sender_blacklist config file can be used for this purpose. This file is a list of senders whose incoming messages will be denied. Negative entries can also be added to the list such that the listed senders would be whitelisted.
 
Keep in mind that there is also an explicit whitelist (/etc/exim4/sender_local_deny_exceptions). Be careful placing items in the blacklist that may also be in the whitelist as entries in the whitelist take precedence over the blacklist entries.

Below is an example of how this file might look:

In /etc/exim4/local_sender_blacklist:

domain.example
!trusted-user@domain.example