Manual SMTP to GMail

StumbleUpon Toolbar | No Comments

Google has started requiring incoming mail to comply with more of RFC2822, particularly with respect to headers; to wit they won't accept incoming mail without a "From:" header. If you try to send without on, you'll get a rejection like this:

this message is not RFC 2822 compliant. To reduce the amount of spam
5.7.1 sent to Gmail, this message has been blocked. Please review
5.7.1 RFC 2822 specifications for more information. iw4si27447595pac.153 - gsmtp

This isn't an issue when you use a mail client, but if you're manually entering SMTP commands, it adds an extra requirement.  The following is a conforming session, or at least conforming enough -- the RFC requires a Date header as well, but Google isn't enforcing that

$ telnet smtp-server 25
220 SMTP_SERVER Microsoft ESMTP MAIL Service ready at Thu, 27 Jun 2013 22:45:15 -0400
helo
250 SMTP_SERVER Hello [10.103.13.44]
mail from: my_address@domain
250 2.1.0 Sender OK
rcpt to: target_address@domain.gmail.com
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
From: ME
Subject: testing SMTP

this is a test

(props to)
A

Leave a comment

About this Entry

This page contains a single entry by Aaron Macks published on June 27, 2013 10:40 PM.

A Vessel was the previous entry in this blog.

Watch the Pinhole is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID