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 Nov 26, 2023
1 parent 1182024 commit 694834c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imap/pop3d.c
Expand Up @@ -2073,6 +2073,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 694834c

Please sign in to comment.