Closed kumy closed 3 years ago
The purpose of that dot-stuffing replacement is https://tools.ietf.org/html/rfc5321#section-4.5.2
it basically says that all lines should be prefixed by a dot and you have to make sure a single dot line is not terminating the message. But after reading some comments on SO, there might be better solutions https://stackoverflow.com/a/38447917
Thanks for pointing me in the right direction. So it seems the MTA job to remove that double dot.
For this use case, I'm using https://github.com/aarongough/mini-smtp-server so it should be it's job to remove this double dot. And another point is that this smtp server doesn't announce it's capabilities (as for example postfix
do), that's why I'm reaching the else
part of this code.
Also as proposed in another response in the stackoverflow thread, converting all dots to =2E
may help to communicate with server not respecting standard. But it's only a workaround against some broken servers, which could be generally a "wrong approach" :/
SMTP session with mini-smtp-server
:
$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 hello
EHLO kumy.net
220 go on...
SMTP sessions with postfix
:
$ telnet xxxx 25
Trying 2001:xxxxx...
Connected to mx6.kumy.net.
Escape character is '^]'.
220 xxxx ESMTP Postfix
EHLO kumy.net
250-xxxxxx
250-PIPELINING
250-SIZE 502400000
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 SMTPUTF8
I'll also report this problem to aarongough/mini-smtp-server project.
So I feel it's not a bug in f3, I'll close. Thanks again for your support @ikkez!
Relates to :
https://github.com/bcosca/fatfree-core/blob/e8334115f9aa69421427259e8e0b673945591ff4/smtp.php#L186-L192
I'm wondering what's the purpose of this replacement? I have trouble with this, some urls in my mail receive this double dot and break links. Also from what I've read about
Content-Transfer-Encoding 'quote-printable'
(Source: 5.1 Quoted-Printable Content-Transfer-Encoding)
but adding one character brings the line to 77 character.
Here are two examples:
As the code was already broken when it was committed 5 years ago by a syntax error, and fixed two times (2f84f9cc , 2756ccc) after, I'm wondering if this edge case has a real sense at all?