In a previous post, I explained how to setup a catchall with Exim. This to create multiple addresses all redirecting to the same destination:
catchall_pub: driver = redirect domains = ads.mydomain.com data = user@mydomain.com
Then, I wrote that on destination address we could setup a Sieve or Exim filter with a .forward
file.
If you want to do that directly in Exim, to have all config in one place, or simply if your destination mail box doesn’t supports filters…
Just add a local_parts
option:
catchall_pub: driver = redirect domains = ads.mydomain.com local_parts = !/etc/exim4/ads.mydomain.com.blacklist data = user@mydomain.com
In /etc/exim4/ads.mydomain.com.blacklist
we put all rejected addresses, one per line:
foo1 bar2
This way foo1@ads.mydomain.com and bar2@ads.mydomain.com will be rejected.
Exim4 Doc: