2

I run an exim4 instance that is the primary MX for my domain and receives email from the public Internet. Mail for my users is forwarded on to other email addresses - I use the redirect router and alias files to achieve this.

Sometimes, the email server receiving the forwarded message rejects it. In this case, exim bounces the message back to the original sender.

I would prefer that if the redirected delivery fails, exim does not cause the whole delivery to fail, but instead falls back to an alternative router, such as to make a local delivery.

Is this possible, and how can I configure this behaviour?

1

redirect is not intended for mass forwarding. May be you have to setup the begin rewrite section in the config?

begin rewrite
*@first.domain.tld  $local_part@second.domain.tld       Eh

Here all the messages for first.domain.tld will be rewrited and recipient address will be substituted by second.domain.tld. Then your routers relay messages to the right box.

Other possible situation is that you have two servers that should be responsive for the same local_domains. In that case you have to add manualroute router that retransmit incoming message to the other server - accordingly to the set of conditions.

| improve this answer | |
  • You didn't answer the fallback aspect of the question. how to add a fallback if one router fails (say delivery to my home machine fails for 4h, then i want it to be delivered locally to a maildir which is synchronized with via cronjob to my home machine. that way i could read all emails even if my home machine is down) – user56452 Sep 7 '16 at 22:16

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.