Our primary MX record points to an external server which handles spam filtering, thereafter the mail is pushed to our internal mail server. The mail is never stored on the external server for longer than it takes to process the mail and deliver it to our internal server.
The current setup requires that we connect to our internal server to retrieve mail. The problem with this setup is that roaming users are unable to access their email if our internet connectivity at the office goes down. An alternative is to host all our mail externally, but this means that users in the office must be connected to the internet for the duration it takes to download and send all their mail, which will be significantly slower than if we had a mail server on the LAN handling the mail. Additionally, this setup would mean that even internal mail has to leave the network, which is terribly inefficient.
Are there any methods whereby we can have both our internal server and our external server hosting the mail, and depending on the DNS record (from within the office the DNS record will resolve to our internal server, and externally the record will resolve to our offsite mail server) our users will always be able to send and retrieve their mail? ie. users should be able to use either of the two mail servers to retrieve their mail. I've given some thought to using IMAP in this situation, but would this not cause mail duplication when switching between servers?
The architecture is irrelevant. I'm looking for any solution, regardless of whether it's based on Exim, Exchange, or anything else that we can setup ourselves.