Q9805 - Exim/exim GitHub Wiki

Q9805

Question

How can I configure Exim so that all mails addressed to [[email protected]](mailto:[email protected]) get delivered to /var/spool/mail/username?

Answer

Assuming that you have set up username as a normal user, with conventional routing for [[email protected]](mailto:[email protected]) to that mailbox, all you need to do is set up a redirection, using a router like this:

user_in_domain:
  driver = redirect
  data = ${if match{$domain}{\N^(.*)\.domain\.net$\N}\
         {$1}fail}@domain.net

If you set envelope_to_add in the appendfile transport, the original envelope address is preserved in the message in an Envelope-to: header line.


⚠️ **GitHub.com Fallback** ⚠️