]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3c: If POP3 server doesn't support CAPA command, try to use UIDL anyway.
authorTimo Sirainen <tss@iki.fi>
Wed, 25 Jul 2012 12:39:14 +0000 (15:39 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 25 Jul 2012 12:39:14 +0000 (15:39 +0300)
src/lib-storage/index/pop3c/pop3c-client.c

index 04084bd929373547f5195b73df1c88a0771a0122..d64136c1d47e5691b913a1d944fecc111c65c36c 100644 (file)
@@ -348,8 +348,13 @@ pop3c_client_prelogin_input_line(struct pop3c_client *client, const char *line)
                client->state = POP3C_CLIENT_STATE_CAPA;
                break;
        case POP3C_CLIENT_STATE_CAPA:
-               if (strncasecmp(line, "-ERR", 4) == 0 ||
-                   strcmp(line, ".") == 0) {
+               if (strncasecmp(line, "-ERR", 4) == 0) {
+                       /* CAPA command not supported. some commands still
+                          support UIDL though. */
+                       client->capabilities |= POP3C_CAPABILITY_UIDL;
+                       pop3c_client_login_finished(client);
+                       break;
+               } else if (strcmp(line, ".") == 0) {
                        pop3c_client_login_finished(client);
                        break;
                }