Skip to content
5lava edited this page Mar 15, 2015 · 3 revisions

Q9805

Question

How can I configure Exim so that all mails addressed to [something@username.domain.net](mailto:something@username.domain.net) get delivered to /var/spool/mail/username?

Answer

Assuming that you have set up username as a normal user, with conventional routing for [username@domain.net](mailto:username@domain.net) 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.


Clone this wiki locally