Link to home
Start Free TrialLog in
Avatar of cdavis82
cdavis82

asked on

Office 365 SPF Record Problem

Using Office 365 to send to recipients from our domain.  It appears one recipient has changed their domain to reject non matching SPF records.  Received this NDR:

recipientmailserver.com rejected your message to the following email addresses:
Recipient (recipient@recipientdomain2.com)
Your message wasn't delivered because the recipient's email provider rejected it.
recipientmailserver.com gave this error:
Invalid SPF Record; Contact your local email administrator to resolve the issue.




Diagnostic information for administrators:
Generating server: DM5PR1201MB0090.namprd12.prod.outlook.com
recipient@recipientdomain2.com
recipientmailserver.com
Remote Server returned '550 5.7.0 Invalid SPF Record; Contact your local email administrator to resolve the issue.'
Original message headers:
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=LE2wpgPFaGJtKHo+NlrfwuJMVkrHFOuOHSE657xyDbKtLEjjSsBxXU8ASmH4+lvXZ6NziGOebhyzc01S5+2h8qc2pJSddAxDoRBpDjLbp1lJdGyhVHjxasqcZJslVBSRG12brkZwbCXcAybY77PBJT7GyG5nYsLoOGYNuSD0SGB7T5OUUfm7yBvKqiGYSHHxzMeFo1zcaVnwn960URbFrClpGcz1nwmhtjAFXwZsA5LSO+w1Pij8zIXEaDFIQMeE8lELZ62L+KPnU3Hbk3JT83B+uFTHijTwKY5T873DiIkgOYOE/F0lGma9MTDQV30xXp/ML6qGwLpn/hNUPf3VeA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=snYS1hA+T5IMnXx86tPEkzJIEJUcNCynIO9yzOQNc0M=;
 b=WQgVwBLmy/LqmxwLBR2J4sJu4pc0xocQxC+mnK/7JUAC/wsA9OMtB8TxjwklzsM128rfzmQPvSVh3IIlqMHYM6UYdV+Ugj2AybVsAzVamYmWR0gUf6QGUeRoQvEleni4kOvzyprV6fzBpQaWYv8m0rJ+d7ou75eSJ5fOq5sbOvWiTTvPCTox9MPkhqP0/UMGIt3kFSWefhPluh7X0xRg765UwH4bt4o23GXAPnO+sdsqq3VEvaIaEzqHUrTE5VhqtFdJJ8380mR5uF8XVRtHpzrFXLx20VRsrTigyTq34bVEVMqcOTSzj31TuvSQFrNmha25myJiBKwSs7fQE7v3DQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=medteleco.com; dmarc=pass action=none
 header.from=medteleco.com; dkim=pass header.d=medteleco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=medtele.onmicrosoft.com; s=selector2-medtele-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=snYS1hA+T5IMnXx86tPEkzJIEJUcNCynIO9yzOQNc0M=;
 b=oCU+diINIoSwYcDX0ebJC1JMu2DyKziStmr3KmMOQKPOQKb3KsnnKanGoRb3WTrBaqSCuvn8kqb8VBuVSBjxXFcBtAsWJvOiIfYlgYK7bZLpjpPQfbnRolkQJOBIVnGHyiCzgxzwa2l42Qi0NZa+QkONLf06SIBS78xfCi6u69U=
Received: from DM5PR1201MB0091.namprd12.prod.outlook.com (10.174.107.151) by
 DM5PR1201MB0090.namprd12.prod.outlook.com (10.174.105.140) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.2347.16; Wed, 16 Oct 2019 17:46:46 +0000
Received: from DM5PR1201MB0091.namprd12.prod.outlook.com
 ([fe80::d868:482d:da9e:122b]) by DM5PR1201MB0091.namprd12.prod.outlook.com
 ([fe80::d868:482d:da9e:122b%10]) with mapi id 15.20.2347.023; Wed, 16 Oct
 2019 17:46:46 +0000
From: Sender <sender@medteleco.com>
To: Recipient <recipient@recipientdomain2.com>
Subject: RE: Call Logs
Thread-Topic: Call Logs
Thread-Index: AdWDqTN+xFr9Or2LQ9u9XSK/oThwdQAl0DQwAABxRWAAAdtcIA==
Date: Wed, 16 Oct 2019 17:46:45 +0000
Message-ID: <DM5PR1201MB009108E8A3D38A31D7510D63B8920@DM5PR1201MB0091.namprd12.prod.outlook.com>
References: <MN2PR02MB6800053D80E98F2CF00C2C0184930@MN2PR02MB6800.namprd02.prod.outlook.com>
 <DM5PR1201MB0091174C01079D035F517EB6B8920@DM5PR1201MB0091.namprd12.prod.outlook.com>
 <CH2PR02MB67894FC54C6D2B8FA90F2C1384920@CH2PR02MB6789.namprd02.prod.outlook.com>
In-Reply-To: <CH2PR02MB67894FC54C6D2B8FA90F2C1384920@CH2PR02MB6789.namprd02.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is )
 smtp.mailfrom=sender@medteleco.com;
x-originating-ip: [75.145.112.133]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 39256351-ac5e-487e-1d76-08d75260d03d
x-ms-traffictypediagnostic: DM5PR1201MB0090:
x-microsoft-antispam-prvs: <DM5PR1201MB00909EFB1194F4519172C705B8920@DM5PR1201MB0090.namprd12.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-forefront-prvs: 0192E812EC
x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(346002)(376002)(39840400004)(396003)(43234003)(189003)(199004)(508600001)(6306002)(486006)(5660300002)(102836004)(2906002)(790700001)(3846002)(6436002)(66066001)(52536014)(446003)(33656002)(55016002)(54896002)(476003)(25786009)(11346002)(9686003)(236005)(6116002)(26005)(229853002)(6246003)(71190400001)(6916009)(256004)(316002)(76176011)(74316002)(5024004)(186003)(14444005)(71200400001)(64756008)(14454004)(66446008)(66946007)(66556008)(66476007)(53546011)(7736002)(6506007)(81156014)(86362001)(8676002)(76116006)(81166006)(7696005)(8936002)(99286004);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB0090;H:DM5PR1201MB0091.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1;
received-spf: None (protection.outlook.com: medteleco.com does not designate
 permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 2aIpjsmGp3ZZgXkf3B4PeoWC1LECunGIvm8oLBdD3xCTj69FHFTcZPxgjrrxrBgXEU2jKFJUiMCa44jSdjE9JoVbG/R0mawIlSY9MmHI4uzZ0Dd0jYyMihGCp969QLs0fw2xE5dscbrIB17TIYGpP/i6CNhZmio1yVoE1lpkFTkiAkE9zNxMrYFUofjNmpRJeT3m728vH4Ou7Kr0pRk5ND+T7oley6Ff6Zf8j5PFTsAQ3QCUn0t/FfvEf/+JACt/MXN3lDvYYp3gsEz1WPwsswpR33raphUSXyrFMcsVrp2SOR2uXkVuRPJ8S60aU3UUNEQQUnYjOCaR8fdHxuUUMy4650On1XRMWwJmq1zwGoj0fsTuPpIoG3GA6tVTC1Saqsu8Ldp0wpSUALqTD3mrG1TwF2M0WcBugDQCp7YTBOzfVz/WsHU9kPbcquqU3OqBdMmY8pFT588gud4DQSMsRQ==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative;
        boundary="_000_DM5PR1201MB009108E8A3D38A31D7510D63B8920DM5PR1201MB0091_"
MIME-Version: 1.0
X-OriginatorOrg: medteleco.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 39256351-ac5e-487e-1d76-08d75260d03d
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2019 17:46:45.8849
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 515ade54-b1b0-422d-a2bd-c19ba43aeb4d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ykNQ7MmGEQaDjXuwdWJaBboL//WzdATxumAVc8r9x6Jx01REa7/rVbzuDFntBkVT5CC8ja40BSyieixRpfzcuQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0090


Our SPF records are this:

The TXT records found for your domain are:
ca3-fb4e0338df1341bda9d096ba47a0b0c9
google-site-verification=3FBtxoKaK8uEmXHUm4uT9oql31M9PsSExZfe7X9h6fc
v=spf1 include:spf.protection.outlook.com -all
MS=ms63752656
v=spf1 ip4:67.41.129.214 include:spf.protection.outlook.com
v=spf1 ip4:75.145.112.133 include:spf.protection.outlook.com


I'm not sure if we need to add our sending domain to the SPF records or if the recipient has something misconfigured on their end.  We have been sending to them this way for well over a year with no problems.  

Any advice would be appreciated.

Thanks,
cdavis82
Avatar of Rajkumar Duraisamy
Rajkumar Duraisamy
Flag of India image

Look at your server IP and the spf record include your sending server ip...
Avatar of cdavis82
cdavis82

ASKER

Not sure I understand.  We're using Office 365.  I don't know the IP.  We setup the SPF records per their requirements.  The IP's in the SPF record are our IP's that resolve to our domain.
You have multiple SPF records, that's NOT supported and results in invalidating the whole record. If you need to add multiple IPs/FQDNs, combine them in a single record.
Would this be a better format?

v=spf1 ip4:67.41.129.214 ip4:75.145.112.133 include:spf.protection.outlook.com -all
"The IP's in the SPF record are our IP's that resolve to our domain."
In addition to the multiple SPF records mentioned above, the IP addresses you've used may be incorrect.  They should point to the sending mail server (at outlook.com) not your domain.

I have a client in a similar situation.  The SPF record we use (that hasn't given us any trouble) is:
v=spf1 include:spf.protection.outlook.com -all
You may want to make the record less restrictive, in case you send email from other IP addresses (perhaps transactional email for instance). To do that you change the "-" to a "~".

So your single SPF record would be:

v=spf1 ip4:67.41.129.214 ip4:75.145.112.133 include:spf.protection.outlook.com ~all
Yes.. that is right.. Only Exchange Online Protection and those 2 IP addresses can send emails to internet as your domain..
Yes, that format should work. Dont forget to remove all other SPF records.
@Graham:
I recently changed a different client's SPF record from "~all" to "-all" because of a significant issue.  Someone was spoofing email from one of the valid accounts.  Because it appeared to be coming from the correct domain (though a different IP address than I had specified), the "~" allowed it through.  Changing it to "-" resolved that.
@CompProbSolv

While "spoofing" can become an issue, as the opener of this question indicated that they were using other servers to send email (even although they have delegated their domain email to MS O365) there is a strong possibility that other servers/IPs are also sending email on their domain. Thus, to negate the problem, relaxing the SPF record seemed appropriate.

Having said that, most main stream MTAs will flag a message/connection from an unidentified sending IP as it is considered a "soft fail" on SPF - which is the purpose of the "~". Meaning it tells the receiving server to treat the message as suspect -  a "relaxed" soft fail.

In the overall arsenal of Anti Spam measures, SPF plays a very small role, and is for the most part ignored. DKIM coupled with DMARC is a far more effective route.
ASKER CERTIFIED SOLUTION
Avatar of cdavis82
cdavis82

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial