linux 发送邮件插入!990个字符后电子邮件中间的符号

yptwkmov  于 2023-05-22  发布在  Linux
关注(0)|答案(3)|浏览(219)

我使用sendmail -v www.example.com < t.txt从sendmail发送邮件rohit@XXXXXXX.com,但是当我使用outlook或gmail接收邮件时,我会得到额外的邮件!990个字符后的字符https://infoeu.!mytotalconnectcomfort.com。我不明白为什么额外的字符是由sendmail插入!你是谁?

<html><head><meta http-equiv=Content-Type content=text/html; charset=utf-8/></head><body><p>Dear Mr/Ms scure dhf</p><p>Thank you for choosing XXXXXXX.</p><p> In order to live a fulfilling experience with your newly purchased XXXXXXX system, please read carefully the following guidance.</p><p> <strong>1. Domonial owners</strong></p><p>To remotely operate your system, please access the following Internet address: <u><a href=https://tc20e.total-connect.eu/>https://tc20e.total-connect.eu/</a></u></p><p> Your login is: sucre567</p><p> Your password is: sucre567</p><p><strong>2. Sucre Box and Sucre Box + owners</strong></p><p> Sucre Box and Sucre Box + owners can live a fulfilling experience by installing our latest Total Connect Comfort International smartphone application available for both Android phones and IPhones.</p><p> <strong><em>2.1  If you want to use the application</em></strong></p><p> Connect to <u><a href=https://infoeu.mytotalconnectcomfort.com/>https://infoeu.!
     mytotalconnectcomfort.com</a></u></p><p>Create an account or login if you already have one</p><p> Access the security section and follow the instructions</p><p>The security login and password will be requested:</p><p>Security login: sucre567</p><p>Security password: sucre567</p><p> And don&#146;t forget to download the app on your smartphone!</p><p><strong><em>2.2  If you don&#146;t want to use the application</em></strong></p><p>To set up and remotely operate your system, please access the following Internet address: <u><a href=https://tc20e.total-connect.eu/>https://tc20e.total-connect.eu/</a></u></p><p>Your login is: sucre567</p><p>Your password is: sucre567</p><p><strong>3.  Sucre GPRS owners</strong></p><p>To set up and remotely operate your system, please access the following Internet address: <u><a href=https://tc20e.total-connect.eu/>https://tc20e.total-connect.eu/</a></u></p><p>Your login is: sucre567</p><p> Your password is: sucre567</p></body></html>
ttisahbt

ttisahbt1#

如果句子长度超过990个字符,sendmail或mail将插入一个!标记。为避免出现此问题,请使用\r\n将句子拆分,然后将其编码为%0D%0A(相当于\r\n)。问题就解决了。另外,我们可以修改/etc/mail/sendmail.cf L=990到一些更大的值,这也将解决这个问题。线路来自sendmail.cf P=[IPC],F=mDFMuX,S=EnvFromSMTP/HdrFromSMTP,R=EnvToSMTP,E=\r\n,L=990,T=DNS/RFC822/SMTP,A=TCP $h

5rgfhyps

5rgfhyps2#

使用fold命令也是添加换行以避免此问题的一种方法。

unhi4e5o

unhi4e5o3#

SMTP RFC5321指定消息行的最大长度限制。
Sendmail会打断长行以避免超过限制。
https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.6

修复

你似乎发送HTML上下文。您可以使用tidy程序来重新格式化您的html。它还应该打破长的html行。

相关问题