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

POP3 response not properly byte-stuffed #475

Closed
Spunc opened this issue Aug 10, 2022 · 1 comment
Closed

POP3 response not properly byte-stuffed #475

Spunc opened this issue Aug 10, 2022 · 1 comment
Assignees
Labels
backport_1_6_x Backport to old bugfixing branch 1.6.x bug
Milestone

Comments

@Spunc
Copy link

Spunc commented Aug 10, 2022

Problem

When retrieving an e-mail via POP3 that has a termination octet within its content, the response from Greenmail is not byte-stuffed. As a consequence, proper working email clients may cut of the part of the email that follows after that point.

Affected version

I found the problem with Greenmail/standalone 1.6.9.

How to reproduce

  1. Send an email to Greenmail which contains a termination octet within its content, e. g.
This line will be transferred.

.

This line will not be transferred.
  1. Connect an email client (I used Thunderbird) via POP3 to the inbox at Greenmail. The client will only download the email until it sees the termination octet.

Background

RFC 1939 mentions at section 3:

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.
Hence a multi-line response is terminated with the five octets
"CRLF.CRLF".

@marcelmay marcelmay added the bug label Aug 10, 2022
@marcelmay marcelmay self-assigned this Aug 10, 2022
@marcelmay marcelmay added the backport_1_6_x Backport to old bugfixing branch 1.6.x label Aug 10, 2022
@marcelmay marcelmay added this to the 2.0.0-alpha-3 milestone Aug 10, 2022
marcelmay added a commit that referenced this issue Aug 10, 2022
@marcelmay
Copy link
Member

Thanks alot, @Spunc !

Just backported the fix to 1.6.x branch if you want to try out snapshot version. I plan to roll a 1.6.11 release this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport_1_6_x Backport to old bugfixing branch 1.6.x bug
Projects
None yet
Development

No branches or pull requests

2 participants