Q0416 - Exim/exim GitHub Wiki
Q0416
What is quickest way to set up Exim so any message sent to a non-existing user would bounce back with a different message, based on the name of non-existing user?
Place this router last, so that it catches any local addresses that are not otherwise handled:
non_exist:
driver = accept
transport = non_exist_reply
no_verify
Then add the following transport to the transports section:
non_exist_reply:
driver = autoreply
user = exim
to = $sender_address
subject = User does not exist
text = You sent mail to $local_part. That's not a valid user here. \
The subject was: $subject.
If you want to pick up a message from a file, you can use the file
option (use file_expand
if you want its contents expanded).