Q0419 - Exim/exim GitHub Wiki
Q0419
I have some obsolete domains which people have been warned not to use any more. How can I arrange to delete any mail that is sent to them?
To reject them at SMTP time, with a customized error message, place statments like this in the ACL:
deny message = The domain $domain is obsolete
domains = lsearch;/etc/exim/obsolete.domains
For messages that don't arrive over SMTP, you can use a router like this to bounce them:
obsolete:
driver = redirect
domains = lsearch;/etc/exim/obsolete.domains
allow_fail
data = :fail: the domain $domain is obsolete
If you just want to throw away mail to those domains, accept them at SMTP time, and use a router like this:
obsolete:
domains = lsearch;/etc/exim/obsolete.domains
data = :blackhole: