rjbs / Email-Sender

a perl library for sending email
56 stars 39 forks source link

SMTP "dot-stuffing" seems broken #65

Closed nrdvana closed 5 years ago

nrdvana commented 5 years ago

Hi, I recently upgraded my entire perl ecosystem to latest versions, and within a month ran into a new problem where something in the chain of Email::Sender::Transport::SMTP::Persistent is not performing SMTP "dot stuffing". Specifically, if one line of the DATA of an SMTP message begins with "..", the server will strip out the first character according to the SMTP protocol.

https://wordtothewise.com/2018/11/why-do-my-urls-have-two-dots/

We send millions of emails a month, but it is also extremely rare that any line of a message would begin with "..", and also unlikely that anyone would even notice, so I can't say whether this bug was caused by the version bump or if it has always been there. Someone noticed this one because a URL with a "key" in it just happened to contain ".." and it just happened to land on the line boundary when wrapped, resulting in a broken key.

Do you know offhand where in the code the dot stuffing would have been happening? Was it ever part of the module? Did it used to be handled by Net::SMTP?

nrdvana commented 5 years ago

Nevermind. I just found documentation in Net::Cmd that:

so Email::Sender::SMTP is written correctly, and my problem must be elsewhere.