I have found conflicting information about dot stuffing when transmitting an email.
Can anyone clarify?
The functioning of an SMTP server can be broken down into two steps. The first step includes verification of the computer configuration through which an email is sent and granting permission for the process. In the second step, it sends out the message and follows the successful delivery of the email.
Relative paths refer to file locations based on the current directory. That is, they often refer to locations in the form of “up one directory level” and often begin with one or two dots (“.”). An example would be “../index. html” which would refer to the file “index.
Like all servers, an SMTP server is an application that provides a service to other applications within a network, called clients. Specifically, an SMTP server handles the sending, receiving, and relaying of email. You can think of servers as your real-life post offices.
According to the SMTP standard RFC 5321, section 4.5.2:
https://www.rfc-editor.org/rfc/rfc5321#section-4.5.2
To allow all user composed text to be transmitted transparently, the following procedures are used:
- Before sending a line of mail text, the SMTP client checks the first character of the line. If it is a period, one additional period is inserted at the beginning of the line.
- When a line of mail text is received by the SMTP server, it checks the line. If the line is composed of a single period, it is treated as the end of mail indicator. If the first character is a period and there are other characters on the line, the first character is deleted.
So, from the three points of your question, the second one is right.
The practical answer: If you're using quoted printable format then always translate a dot to =2E. You can't rely on all smtp servers doing the dot removal correctly.
If you want to assume the whole world is standards compliant then go with answer 2 above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With