且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从pop3服务器发送格式错误的电子邮件

更新时间:2023-11-26 17:50:28

您可以使用telnet程序手动连接到服务器.然后,您可以阅读纯文本邮件并查看出了什么问题,可以选择使用剪贴板复制内容,还可以选择删除格式错误的邮件:
You may use a telnet program to connect manually to the server. Then you can read the plain text mail and see what is wrong, optional copy the content using the clipboard, and optional delete the malformed mail:
> telnet <server> 110
+OK
user <user name>
+OK
pass <password>
+OK
stat
+OK 2 1980
list
+OK 2 messages (1980 octets)
1 1000
2 980
.
top 1 10
+ OK
<First 10 lines of mail no. 1>
.
retr 2
+OK
<Content of mail no. 2>
.
dele 2
+OK message 2 deleted
quit
+OK
>



[更新]
POP服务器发送".CRLF"序列以指示数据结束.请参阅RFC 1939 [ ^ ],"3.基本操作" ,第4个文本块,有关此内容以及如何处理包含终止序列的文本.邮件文本是否包含此顺序并不重要.

该问题是由接受无效邮件(应拒绝此类邮件)的邮件提供商SMTP服务器代码或设置引起的,或者由其本地邮件传递过程(可能会损坏邮件或插入无效的标头)引起. [/UPDATE]



[UPDATE]
The ".CRLF" sequence is send by the POP server to indicate the end of data. See RFC 1939 [^], "3. Basic Operation", 4th text block, about this and how text containing the termination sequence is handled. It does not matter if the mail text contains this sequence.

The problem is sourced by the mail providers SMTP server code or setup which accepts an invalid mail (such mails should be rejected), or by his local mail delivery procedure which may damage the message or insert invalid headers.
[/UPDATE]