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?
redirect
is not intended for mass forwarding. May be you have to setup thebegin rewrite
section in the config?Here all the messages for
first.domain.tld
will be rewrited and recipient address will be substituted bysecond.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.