Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mailpit-299 [fix] Adding dot stuffing for POP3 #300

Merged
merged 1 commit into from
May 18, 2024

Conversation

henningp
Copy link
Contributor

Fixes issue 299 by adding dot stuffing to the POP3 server.

From the POP3 spec:

When all lines of the response have been sent, a
final line is sent, consisting of a termination octet (decimal code
046, ".") and a CRLF pair. If any line of the multi-line response
begins with the termination octet, the line is "byte-stuffed" by
pre-pending the termination octet to that line of the response.

In practice, this means that any message line starting with a dot must have an extra dot added at the start of the line. (The same technique is used in SMTP.)

Note: This is my first line of Golang. It does work, but I am not sure about its style.

@axllent axllent merged commit 0ec2f8b into axllent:develop May 18, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POP3 server does not do dot stuffing
2 participants