I have a scenario where email is sent through my outbound relay with a do-not-reply 'To:' recipient (the actual recipients are BCCd).

Example of what these emails look like:

From: <from@mydomain.com>
To: <do-not-reply@mydomain.com>
Bcc: <actualrecipient@gmail.com>
Subject: foo

The BCCd recipients should still receive mail, but I'd like to blackhole the attempt to deliver to the do-not-reply recipient, which exists on an external domain. Note that mydomain.com is not hosted by this exim server for incoming mail - this mail server is strictly for relaying.

I attempted a rewrite approach but that would modify the 'To' address that the BCC recipient sees, which looks confusing. Since the do-not-reply recipient is not going to a locally hosted domain, a traditional aliases setup to blackhole the address doesn't work, to my knowledge.


You can use a redirect router. In the routers section of your Exim config file, add the following router:

    driver = redirect
    local_parts = do-not-reply
    domains = mydomain.com
    data = :blackhole:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.