--- src/pop3/client.h Wed Jan 14 21:10:33 2009 +++ src/pop3/client.h Wed Dec 2 13:05:12 2009 @@ -46,6 +46,7 @@ unsigned int disconnected:1; unsigned int deleted:1; unsigned int waiting_input:1; + unsigned int noop_count; }; /* Create new client with specified input/output handles. socket specifies --- src/pop3/client.c Tue Jan 6 19:33:51 2009 +++ src/pop3/client.c Wed Dec 2 13:06:54 2009 @@ -163,6 +163,7 @@ client_idle_timeout, client); client->namespaces = namespaces; + client->noop_count=0; inbox = "INBOX"; client->inbox_ns = mail_namespace_find(namespaces, &inbox); --- src/pop3/commands.c Wed Jan 14 21:11:18 2009 +++ src/pop3/commands.c Wed Dec 2 13:12:53 2009 @@ -178,6 +178,9 @@ static int cmd_noop(struct client *client, const char *args ATTR_UNUSED) { + client->noop_count++; + if (client->noop_count > 10) + return cmd_quit(client, args); client_send_line(client, "+OK"); return 1; }