routing linux host only email from Exchange Online
by mfoley from LinuxQuestions.org on (#57Q8C)
Our office currently hosts its own mail server using sendmail. We now have to (unfortunately) move all email to Hosted Exchange (outlook.com). However there are a number of user accounts for which I want the mail to stay on the Linux servers. For example root, and linux host specific user accounts like mfoley@mydom.com. I do not want to create Exchange accounts for these users, nor do I want to store their email on outlook.com.
Any ideas on how I can accomplish this?
Here's my preliminary thinking ...
I could create an alias/forward in Exchange: mfoley@mydom.com -> mfoley@mail.mydom.com; meaning I would route all email for mfoley@mydom.com to the specific local host 'mail'. I would hope that server mail.mydom.com would then save the message in /var/spool/mail/mfoley.
Of course, the MX record for mydom.com would point to the outlook.com host, not the local 'mail' machine. So, would what I've described work? How would the 'mail' host's sendmail.mc be configured since it is no longer the mail server for the entire domain?


Any ideas on how I can accomplish this?
Here's my preliminary thinking ...
I could create an alias/forward in Exchange: mfoley@mydom.com -> mfoley@mail.mydom.com; meaning I would route all email for mfoley@mydom.com to the specific local host 'mail'. I would hope that server mail.mydom.com would then save the message in /var/spool/mail/mfoley.
Of course, the MX record for mydom.com would point to the outlook.com host, not the local 'mail' machine. So, would what I've described work? How would the 'mail' host's sendmail.mc be configured since it is no longer the mail server for the entire domain?