Why does SMTP-Server give "500 5.5.2 Error: bad syntax" in response DATA?

Why does SMTP-Server give "500 5.5.2 Error: bad syntax" in response DATA?

我正在写一个发送邮件的工具。不幸的是,在处理 DATA-Command 之后,服务器响应错误。 我想看多久就看多久,我看不到任何跳出来的东西。但也许我错过了显而易见的事情。 这是该会话的完整日志:(CRLF 导致日志中出现空白行,但为了真实性,我将其保留在其中)

我还检查了 postfix 日志,但没有任何与此消息相关的错误。

cmd="AUTH LOGIN"
rc=" 0  CLT00000004  Block  334 VXNlcm5hbWU6    

 "                                              
cmd="***"
rc=" 0  CLT00000004  Block  334 UGFzc3dvcmQ6    

 "                                              
cmd="***"
rc=" 0  CLT00000004  Block  235 2.7.0 Authentication successful    

 "                                                                 
cmd="NOOP"
rc=" 0  CLT00000004  Block  250 2.0.0 Ok    

 "                                          
cmd="MAIL FROM: <***>"
rc=" 0  CLT00000004  Block  250 2.1.0 Ok    

 "                                          
cmd="RCPT TO: <***>"
rc=" 0  CLT00000004  Block  250 2.1.5 Ok    

 "                                          
cmd="RCPT TO: <***>"
rc=" 0  CLT00000004  Block  250 2.1.5 Ok    

 "                                          
cmd="DATA"
rc=" 0  CLT00000004  Block  354 End data with <CR><LF>.<CR><LF>    

 "                                                                 
cmd="Subject: [TEST] Here it is

MIME-Version:1.0

Reply-To:<***>

From:<***>

Date: Fri, 29 Nov 2019 10:05:02 +0100

Content-Type: text/plain; charset=utf-8; format=flowed

Content-Transfer-Encoding:7bit



Contributed by: MBaas <***>

first line





and more text
with a lone "." @ EOM




..



.

"
rc=" 0  CLT00000004  Block  250 2.0.0 Ok: queued as 4668A16C05CB                                 

500 5.5.2 Error: bad syntax                                                                      

 "    

Duh,问题是味精内容以 CRLF.CRLF 结尾 - 我添加了另一个 CRLF :((

删除后,一切正常:)