diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2019-05-11 23:51:04 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2019-05-12 09:54:26 +0200 |
commit | 1e3a3e7e47336ceaee07cc495c728e35f4ac9fc6 (patch) | |
tree | 7ffdbbe443cfd67cf69dea1968933ba2691250d9 /imap.c | |
parent | 41e20033d08f7ee7422fa2d353ac4daf7495f887 (diff) | |
download | fetchmail-1e3a3e7e47336ceaee07cc495c728e35f4ac9fc6.tar.gz fetchmail-1e3a3e7e47336ceaee07cc495c728e35f4ac9fc6.tar.bz2 fetchmail-1e3a3e7e47336ceaee07cc495c728e35f4ac9fc6.zip |
Drop socket when receiving unexpected untagged * BYE.
Reported against 6.3.26 by minorwiping@vfemail.net when polling
from imap.yandex.com and it looped on "* BYE Autologout; idle for too long"
in response to a A0001 CAPABILITY request.
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -72,6 +72,10 @@ static int imap_untagged_response(int sock, const char *buf) * connection to be cut-off after this */ if (outlevel > O_SILENT) report(stderr, GT_("Received BYE response from IMAP server: %s\n"), buf + 5); + return PS_SOCKET; /* tell caller to not touch the socket any longer. + Note this is under stage != STAGE_LOGOUT, so when + we are logging out properly, we will complete the + protocol exchange. */ } else if (strstr(buf, " EXISTS")) { |