Four days ago emails sent to our Gmail accounts via our ISP's mail servies started being rejected due to not being RFC 2822 complainant.

The following message to was undeliverable. The reason for the problem:
5.3.0 - Other mail system problem 550-'5.7.1 [2001:44b8:8060:ff02:300:1:6:6 11] Our system has detected that\n5.7.1 this message is not RFC 2822 compliant. To reduce the amount of spam\n5.7.1 sent to Gmail, this message has been blocked. Please review\n5.7.1 RFC 2822 specifications for more information.
iw4si27447595pac.153 - gsmtp'

It’s frustrating because these emails have been working fine for over a year—I'm assuming Google has upped their filters in the last week.

The email address we are trying to send to belongs to our Google Apps for Business account. I'm wondering, is there a way to override the RFC 2822 compliance filter to allow the emails to come through?

So far, adding the ISPs domain name to the spam whitelist in Gmail settings (in the Apps control panel) hasn’t worked.

The telnet log for the rejected message in question is:

220-ipmail06.adl6.xxxxx.net ESMTP 220 ESMTP; eth2958.xxx.adsl.OurISP.net [150.xxx.xxx.xx1] in MTA
HELO WINDOWS-xxxxx (<- this is our server name) 
250 ipmail06.adl6.OurISP.net 
MAIL FROM: account@OurISP.net
250 sender ok 
RCPT TO: admin@googleappsdomain.com
250 recipient ok 
RCPT TO: admin@DifferentGoogleAppsDomain.com
250 recipient ok 
354 go ahead 
Subject: Test email from the Avid ISIS Notification Application This message was generated by Avid ISIS Notification Application. . 
250 ok: Message 716893804 accepted
  • Worth noting that the machine sending the emails doesnt have the ability to add smtp servers that require a password, so we have to use our ISP's server... – OrangeBox Apr 8 '13 at 5:27

RFC2822 says Date: and From: headers are required (section 3.6). It looks like Google will let you get away with just adding a From: header though, e.g.:

354 go ahead 
From: <account@OurISP.net>   <-- add this
Subject: Test email from the Avid ISIS Notification Application This message was generated by Avid ISIS Notification Application.
250 ok: Message 716893804 accepted 
  • ahh, thankyou I'll have to see if the developer of the software can make this change. Do you know if its possible to override Gmails mail server side filters when using Gapps? – OrangeBox Apr 10 '13 at 2:08

Watch for duplicate From: headers or Reply-to: headers that don't match each other. This same problem was experienced by a number of users of Outlook for Mac who had extra header information erroneously migrated from previous mail client accounts. See http://hintsforums.macworld.com/showthread.php?p=718579

  • Thanks for the answer! I've up-voted but not accepted because I'm hoping to find a way to override the filter seeing as we are using Google Apps for business. Any thoughts? – OrangeBox Apr 18 '13 at 7:41
  • @OrangeBox I don't think there is an option, but why not file a feedback request with Google? – poolie Apr 18 '13 at 21:04
  • One interesting thing is that multiple From headers were permitted by RFC822, but are no longer permitted by RFC2822 (published 2001). – poolie Apr 18 '13 at 21:08

I have a PHP script that sends notifications every day, with fields built from a database. At the end of each field, the programmer had used \r\n to end the lines (both carriage return and line feed characters). This doesn't make any sense, but it worked until now.

I took out the \r character and suddenly my mails are now RFC 2822 compliant.


This a bug whatever is doing the validation. RFC 822 theoretically allowed separate CR and LF characters, which are not line ends, but RFC 2822 removes this feature. RFC 2822 section 2.3 says "CR and LF MUST only occur together as CRLF; they MUST NOT appear independently in the body."

What the programmer did is RFC 2822 complaint and your version is not. As a developer I prefer single line feeds but using CRLF in email is an absolute requirement. Ideally a MUA will understand any reasonable line ends.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.