Skip to content

Commit

Permalink
pop3d: try to not split ".\r\n" across packet boundary
Browse files Browse the repository at this point in the history
Works around some Thunderbird bug.  Based on patch provided and
tested in cyrusimap#4717 by @yaonos (Stéphane GAUBERT)

Fixes: cyrusimap#4717
  • Loading branch information
elliefm committed Mar 6, 2024
1 parent 3dc3e3e commit 54a196d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imap/pop3d.c
Expand Up @@ -2052,6 +2052,9 @@ static int blat(int msgno, int lines)
/* Protect against messages not ending in CRLF */
if (buf[strlen(buf)-1] != '\n') prot_printf(popd_out, "\r\n");

/* Clients may become confused when the .\r\n sequence gets split
* up across packets. Flush first to prevent that. */
prot_flush(popd_out);
prot_printf(popd_out, ".\r\n");

/* Reset inactivity timer in case we spend a long time
Expand Down

0 comments on commit 54a196d

Please sign in to comment.