Office 365 emails dns issue

Hi everyone !

I need your help for a problem that i don’t understand what’s the trouble.

I’ve a subdomain subdomain.domain.com that used for both exchange online & website.

So in my dns zone I’ve three entries :

  • a cname record pointed to a LB (load balancing) record that point to the two public IP of our webserver
  • a mx record to point emails to O365 exchange
  • a TXT record for the spf : v=spf1 include:spf.protection.outlook.com -all

So the situation is follow :
when i send a email from another O365 tenant (us or from another client) the emails don’t arrives and are blocked with the error LED=450 4.4.316 Connection refused
when i send the same email from gmail that works

I don’t understand why ? Can you help me ?

here’s the full error from the O365 side :

Reason: [{LED=450 4.4.316 Connection refused [Message=Socket error code 10061] [LastAttemptedServerName=subdomain.domain.com] [LastAttemptedIP=194.xx.xx.xx] [SmtpSecurity=-2;-2] [VXXXXXX.eop-eur05.prod.protection.outlook.com 2023-06-12T10:24:33.145Z 08DB684E271E7413]};{MSG=Socket error code 10061};{FQDN=subdomain.domain.com};{IP=. OutboundProxyTargetIP: xx.xx.xx.xx. OutboundProxyTargetHostName: subdomain.domain.com

the problem here is the system uses the cname subdomain.domain.com instead the MX record from dns zone

for information : CNAME Flattening is configured to ‘Flatten CNAME at root’

i cannot change this default value (no other option proposed)

Ok I read that cname is priority to a MX record.

But how I can resolve my problem when I use LB ?

nobody ?:frowning:

please help me :slight_smile:

It may be that your request for assistance is gaining no traction because it has no obvious connection to Cloudflare. You may have better luck in a forum dedicated to Microsoft 365 email.

ok thank you but I think they will answer me that it’s because I use a cname instead of an A

So, how I can use a loadbalancer with a A record ?

Thank you !

Who is they?

What is?

You should probably post your load balancer question as its own topic.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.