Friday, January 10, 2014

SMTP and Spamhaus blocking. What I learned today.

I was setting up a new client with an Exchange Server, and we discovered that we could not send email to any Microsoft Hosted email addresses.  Basically, to a subdomain of Outlook.com.

All office 365 hosted email domain are subdomains of this address. 

The issue was discovered when we tried to send an email manually using a text based email tool.
The dialog looks like this (note that the unique data has been modified for privacy):

blat.exe -body "this is a test" -to someone@o365hosted.ca -server o365hosted.mail.protection.outlook.com -f me@legit.ca -s "Test of SMTP" -debug
Blat v3.1.1 (build : Feb 27 2013 20:04:23)
32-bit Windows, Full, Unicode

<<6:46 +0000
>>>putline>>> EHLO lab1-exch2013
<<<<... Text removed for clarity

<<Sending stdin.txt to someone@o365hosted.ca
Subject: Test of SMTP
Login name is
Me@legit.ca
>>>putline>>> MAIL FROM:<Me@legit.ca>
<<>>>putline>>> RCPT TO:<someone@o365hosted.ca
>
<<http://www.spamhaus.org/lookup.lasso
*** Warning ***  The SMTP server does not like the name someone@o365hosted.ca.
*** Warning ***  Have you set the 'To:' field correctly, or do you need authorization (-u/-pw) ?
*** Warning ***  The SMTP server response was -> 550 5.7.1 Service unavailable; Client host [123.45.67.89] blocked using Spamhaus; To request removal from this list see
http://www.spamhaus.org/lookup.lasso
>>>putline>>> QUIT
<<


The IP address (not shown) was a static IP assigned to a Telus.Net client.

A quick check at MXToolbox.com revealed that blocked at Spamhaus, and SORBS, but no others.
Next, a check at Spamhaus indicated that the IP Address is listed in the PBL.   What is the PBL you say?  It is a list of addresses that require Authentication or discrete PTR records in order to be trusted.
See https://www.spamhaus.org/lookup/ and enter your IP address for a lookup.
In my case is says:
          

By default, this assumes that the IP is a Dynamically Assigned IP.  In our case of course, from Telus.

There are 2 solutions for our problem of being able to send to any email domain by MX record.
  1. We could go to Telus and request a discrete PTR record, or
  2. we can simple configure the Exchange Send Connector to use the SMTP Smart host of smtp.telus.net.
Update: For Hosted Exchange Hybrid, the above 2 are not options.  Working on a solution..


No comments: