SMTP server closes connection unexpectedly

Posted by janin on Server Fault See other posts from Server Fault or by janin
Published on 2012-04-05T09:06:29Z Indexed on 2012/04/05 11:32 UTC
Read the original article Hit count: 302

Filed under:
|

I'm writing a python program to send emails, and when trying to send to yopmail, hotmail and some other hosts the connection gets closed by the server without a message. I tried connecting directly with netcat and the same thing happens. Here's what the exchange looks like :

$ nc smtp.yopmail.com 25
220 mx.yopmail.com ESMTP ***
ehlo mx.myhost.com
250 SIZE 2048000
mail FROM:<[email protected]>
250 OK
rcpt TO:<[email protected]>    

The connection is just closed abruptly at this point. On other hosts, like my ISP's, everything goes fine. I've checked the blacklists but my IP is not listed. Any idea what's going on?

Edit: My IP is not listed in any blacklist. I own myhost.com, but I don't have an SPF record. I'll add one and update this post when the record has propagated.

Edit 2: with the SPF added the email is now accepted and Hotmail adds a Authentication-Results: hotmail.com; sender-id=pass header to the email. However it gets classified as spam, but I guess that's another matter. Thanks for your help.

© Server Fault or respective owner

Related posts about smtp

Related posts about python