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 #4717 by @yaonos (Stéphane GAUBERT)

Fixes: #4717
  • Loading branch information
elliefm committed Jan 19, 2024
1 parent bbcb6c2 commit 87440f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imap/pop3d.c
Expand Up @@ -2056,6 +2056,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 87440f7

Please sign in to comment.