Telus is rejecting mail from my mail server -- why?

Reply

This thread's discussion is locked. If it doesn't give you the information you need, head to its forum board for active discussions or to start a new discussion.

c_wangersky
Friendly Neighbour
I have been running an email server for one of my clients for literally years. Today, for no reason that I can see, every attempt to mail to a Telus email address is met with the response

Action: failed
Status: 5.1.1
Diagnostic-Code: smtp; 501 5.5.4 Syntax error in BODY parameter
Last-attempt-Date: Wed, 02 Sep 2015 13:14:39 -0600

My mail server has not changed since the last time this worked. What's going on?


xray
All-Star

Most likely due to your server being blacklisted or the emails detected as being spam.

c_wangersky
Friendly Neighbour

That's happened before and been resolved, but never with the "Syntax error in BODY parameter" error message.

Community Power User
Community Power User

Were you sending something with an attachment?


If you find a post useful, please give the author a "Like" or mark as an accepted solution if it solves your trouble. Smiley Happy
c_wangersky
Friendly Neighbour

I'm... not quite sure. It's a message formatted by Outlook using Word as the editor, that went through an Exchange server, and it did contain an image, but when I look at the raw message as I received it on my private (non-Telus) mail, it looks like the image was inline, neither an attachment or an external link. 

Community Power User
Community Power User

Try sending something that you didn't have Word or Outlook create as a test. The error mentioned an issue with the Body syntax. Wonder if something corrupted when you sent it? The error could still mean that the spam filters blocked it but it's more often displaying a different error message.


If you find a post useful, please give the author a "Like" or mark as an accepted solution if it solves your trouble. Smiley Happy
c_wangersky
Friendly Neighbour

So much I had surmised, and in fact a plain text message sent via approximately the same route (using SquirrelMail to create a message forwarded to the Exchange server via IMAP/SMTP for transmission to a Telus account) was received without difficulty. Does the actual message body, then, count as a "parameter" to the BODY command? I kind of have to discount the filters; the two times (in ten years) that spam filters have popped, there has been an RBL notice and a link to clear up the problem... 

Highlighted
Community Power User
Community Power User

If it's got HTML in it, which if it's showing formatting, picture, links, etc, then yes, it has a Body tag in it. Microsoft Word is not known for remotely being able to create the cleanest code. Outlook won't improve it. You may want to try another HTML editor to format the email you send out to see if that solves it.


If you find a post useful, please give the author a "Like" or mark as an accepted solution if it solves your trouble. Smiley Happy
c_wangersky
Friendly Neighbour

Umm... I don't want to be contrarian here, but this is a response from the mail server, which should not be trying to interpret the incoming stream as HTML. I'm reading this as being an error return from the SMTP BODY command. IIRC, an SMTP message exchange consists of a certain amount of header information, notably recipients; followed by a BODY command, followed by a nominally opaque block of data which is the message body. The mail server should not be looking for content in that stream; it should only be looking for the blank line delimiter that says the body has ended.


It is possible that the Telus mail server is choking on the embedded image... but why only the Telus server? The same message went to about 100 parents of students at the school and only the eight Telus addresses bounced...

xray
All-Star

Can you do a test by sending the same email from a different server to a TELUS email address? 

c_wangersky
Friendly Neighbour

I'm working on it but it's tricky -- so far I have only received this email via my Outlook client, and Outlook won't allow me to see the raw email. I've asked that it be resent to an account that I can reach with a different client, but it hasn't happened yet.

c_wangersky
Friendly Neighbour

Update: Sending a simple text-only message from the Exchange server to Telus worked. Sending the possibly broken message from the Exchange server to a Linux sendmail server also worked, and sending that same message on from the sendmail server to Telus also worked. It looks like it's just something odd about this message being sent from Exchange to Telus... but I still don't know quite what.

xray
All-Star

I suspect that the HTML editor is creating one or more lines with more than 1000 characters. The limit is described in RFC 5322 Internet Message Format section 2.1.1.

https://tools.ietf.org/html/rfc5322#section-2.1.1

Not all mail server implementations have this limit but the RFC specifies the lowest common denominator.


This may explain why plan text works as the line length corresponds to the actual message lines whereas in HTML message will contain HTML tags that do not require LF's between them. A multi line text message could be sent as a single line of HTML.


Not sure about your test from Linux but it may be that that sendmail automatically re-formats HTML lines by adding LF's where necessary when sending. Note that the limit includes the CR/LF so it may also be a case of the Microsoft using the extra CR and making a line 1001.

c_wangersky
Friendly Neighbour

A good point. I suspect that the issue is not with the HTML, but with the embedded MIME stream that makes up the image. We'll leave it at that for the moment, I guess: for whatever reason, Telus' servers are hewing a little more closely to the spec than most.