I have a vague notion but I'm not clear on the difference between local domains and "relay domains"
I believe that local domains are "localhost" and any other aliases you set the server up to mean "self".
I believe "relay" domains are "everything else?" Like if a DNS has foobar.com
point to this server, then foobar.com
is a relay domain? I am not sure about this point.
In the exim setup file - (exim4.template.conf) What does it mean "fallback MX or mail gateway for domains" - what is fallback mx? Does it mean your server is like a DNS server of sorts?
Local domains are any domains which are on the server and mail to those addresses is delivered to a local mailbox (or a local alias), eg. [email protected] and [email protected] both deliver to john's mailbox on the server, no separation.
A virtual domain is similar, but there will be separation (eg. /var/spool/mail/example2.com/john is a mailbox).
A relay domain is one which your mailserver will deliver to as though it is local, without authentication. Eg. you could configure the server to delay to example3.com even though it's not local.
If any of that is wrong, I'd be happy to be shown the error of my ways.
Fallback MX is nothing but the Secondary Mail Exchanger (MX) or Mail Server. In case if Primary MX goes down, Exim will deliver mails to Secondary MX.