Messages received through LMTP have a final dot that should not be there #77

Closed
opened 2024-01-21 15:05:54 +00:00 by quentin · 0 comments
Owner

Receiving message from LMTP, for example with:

from smtplib import LMTP
with LMTP("::1", port=1025) as lmtp:
    lmtp.set_debuglevel(2)
    lmtp.sendmail(
        "bob@example.tld",
        "alice@example.tld",
        "From: bob@example.tld\r\nTo: alice@example.tld\r\nSubject: Hello\r\n\r\nWorld\r\n",
    )

Will lead to the following RFC822 content:

From: bob@example.tld
To: alice@example.tld
Subject: Hello

World
.

And Thunderbird will display:

World
.

This final dot is part of the LMTP protocol, and not of the IMF/MIME message.

Receiving message from LMTP, for example with: ``` from smtplib import LMTP with LMTP("::1", port=1025) as lmtp: lmtp.set_debuglevel(2) lmtp.sendmail( "bob@example.tld", "alice@example.tld", "From: bob@example.tld\r\nTo: alice@example.tld\r\nSubject: Hello\r\n\r\nWorld\r\n", ) ``` Will lead to the following RFC822 content: ``` From: bob@example.tld To: alice@example.tld Subject: Hello World . ``` And Thunderbird will display: ``` World . ``` This final dot is part of the LMTP protocol, and not of the IMF/MIME message.
quentin added this to the 0.3.0 CalDAV milestone 2024-01-21 15:05:54 +00:00
quentin added the
cat
bug
label 2024-01-21 15:05:54 +00:00
Sign in to join this conversation.
No description provided.