Search code examples
htmllinuxemailsendmail

Sendmail inserting ! symbol in middle of email after 990 characters


I am sending mail from sendmail using sendmail -v [email protected] < t.txt But when i receive the mail using outlook or gmail i get an extra ! character after exactly 990 characters https://infoeu.!mytotalconnectcomfort.com. I dont understand why the extra character is inserted by 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>

Solution

  • SMTP protocol line length limit

    SMTP RFC5321 specifies limits on maximum length of message line.
    Sendmail breaks long lines to avoid crossing the limit.

    https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.6

    FIXES to choose from:
    1 . You seem to send html context. You may use tidy program to reformat your html. It should also break long html lines.
    2. You can send using quoted-printable enconding. It encodes non ASCII characters and takes care of line lengths.