Exim and microsoft 365 connection

unlimited

New member
Joined
Jan 10, 2025
Messages
3
Hello everyone,

I’m dealing with a specific configuration and hope someone can assist me. Here’s my situation:

  1. Mail Settings:
  2. DNS Configuration:
    • There is a single MX record pointing to Microsoft 365.
      domein.nl.3600MX0 domein-nl.mail.protection.outlook.com.


    • SPF, DKIM, and DMARC are configured for both Microsoft 365 and my own server..
      selector1._domainkey3600CNAMEselector1-Domein-nl._domainkey.Domein.onmicrosoft.com.
      selector2._domainkey3600CNAMEselector2-Domein-nl._domainkey.Domein.onmicrosoft.com.
      domein.nl.3600TXT"v=spf1 a mx ip4:MIJNIP include:spf.protection.outlook.com include:SERVER_HOSTNAME ~all"
      x._domainkey3600TXT"v=DKIM1; k=rsa; p=MYKEY"
  3. Problem:
  4. What I’ve Tried:
    • I’ve created two connectors in Exchange 365 (Connector 1: from the server to Microsoft, Connector 2: from Microsoft to the server).
  5. Question:
If I send an email from another Outlook account to [email protected] (and vice versa), everything works fine.

Does anyone have experience with a similar setup or a better alternative? Thanks in advance for your input!
 
It's not possible to let two totally different services both handle your mail for the same domain,
You can have multiple MX records with priorities, but that's only as backup function, so if server 1 fails then server 2 is tried.

So that is the receiving part.

For the sendingn part, it might be done now you do it, but I would advise against it as you will get into issues with reply's. Unless maybe if you specify the reply-to address from the [email protected] to be send to the info@ or another one handled by whatever the MX record is pointingn to.

Edit: Just looking above, I do seen 2 CNAME records for DKIM to microsoft but no DKIM for your local server, so that will also cause issues if you don't add that either. And then even I'm not sure if it works.

It doesn't really make sense to do something this way. So why would you want such odd configuration?
 
You will most likely need to write your own Exim routers/transports. They will sort the delivery per your own needs.

We made a similar setup for one of customers of mine.
Do you have a example of the exim.conf file / routers/transports? Because i did so many research only and did not found anything. I dont know what/how to do.
 
Do you have a example of the exim.conf file / routers/transports? Because i did so many research only and did not found anything. I dont know what/how to do.

No, I don't have it. It was done as a commercial setup for a customer of mine. And we don't share commercial solutions.

You might check Exim's docs on the their site as well as DA documentation:

- https://docs.directadmin.com/other-...figuring-exim.html#how-to-customize-exim-conf
- https://docs.directadmin.com/other-hosting-services/exim/smarthost.html
- https://docs.directadmin.com/other-hosting-services/exim/troubleshooting.html
 
Back
Top