Servers rejecting mails with "500 Line limit exceeded"
RFC 821 states the maximum line lengths for SMTP transmissions:
command line
The maximum total length of a command line including the
command word and the <CRLF> is 512 characters.
reply line
The maximum total length of a reply line including the
reply code and the <CRLF> is 512 characters.
text line
The maximum total length of a text line including the
<CRLF> is 1000 characters (but not counting the leading
dot duplicated for transparency).
I think your messages exceed one of the aforementioned limits - Exchange seems not to bother, but other servers will.
Related videos on Youtube
proximus
math, complexity, software engineering, e-commerce, trading, cuisine, globetrotting, calmness, courtesy, contentment
Updated on September 18, 2022Comments
-
proximus over 1 year
I am dispatching a few mails (mainly order confirmations) from a webshop using a php mail class. The mails are sent via a local Exchange/SMTP server.
In the majority of cases this works fine and customers receive HTML mails with PDF attachments. But in some cases customers complain about not receiving any mails at all.
MS Exchange informs about mails rejected by several servers - all with the same error message:
500 Line limit exceeded
Does the problem derive from my mails / mail class or is it a server setting? What can I do to avoid it?
-
BenGC almost 13 yearssigh typical microsoft :D
-
proximus almost 13 yearsI suppose it exceeds the text line limit. We did a little further investigation and I am wondering that it bothers just one single mailserver provider and its configuration... Do I have to split my text body on Script-side in case of character amounts per line > 500 by \n (line-breaks), which would evoke problems concerning tags in HTML mails or is it a provider's problem which has to be solved?
-
the-wabbit almost 13 yearsAs the limit is defined in the RFC, it is not the provider's problem. Yes, you should split your overlong lines. It should not create any problems with tags as long as you are not splitting within the tag itself (like
<a \n href=...>
)