Question
How do I test how Exim will route a given address?
Answer
This can be done using the "exim -bt" command. This can be helpful when troubleshooting email delivery and routing issues.
Note: replace $emailacct with the actual email account you are looking to test the routing for.
A few examples of this in action can be seen below:
# exim -bt user@domain.com
user@domain.com
router = virtual_user, transport = dovecot_virtual_delivery_no_batch
# exim -bt user@gmail.com
user@gmail.com
router = dkim_lookuphost, transport = dkim_remote_smtp
host gmail-smtp-in.l.google.com [74.125.140.27] MX=5
host alt1.gmail-smtp-in.l.google.com [209.85.233.27] MX=10
host alt2.gmail-smtp-in.l.google.com [142.250.4.27] MX=20
host alt3.gmail-smtp-in.l.google.com [108.177.97.27] MX=30
host alt4.gmail-smtp-in.l.google.com [74.125.28.27] MX=40
More information can be found via the man page for the exim command below: