client.c revision bc6294e4f0d7a54ff601257adaa44331a91b234e
1968N/A/* Copyright (C) 2002 Timo Sirainen */ 1968N/A/* max. size of one parameter in line */ 1968N/A/* maximum length for IMAP command line. */ 1968N/A/* Disconnect client after idling this many seconds */ 1968N/A/* Disconnect client when it sends too many bad commands */ 1968N/A/* When max. number of simultaneous connections is reached, few of the 1968N/A oldest connections are disconnected. Since we have to go through the whole 1968N/A client hash, it's faster if we disconnect multiple clients. */ 1968N/A/* Skip incoming data until newline is found, 2028N/A returns TRUE if newline was found. */ 1968N/A /* must be removed before ssl_proxy_new(), since it may 2028N/A /* we skipped it already, so don't ignore next command */ 2301N/A return FALSE;
/* wait until authentication is finished */ 2301N/A /* clear the previous command from memory. don't do this 2301N/A immediately after handling command since we need the 2301N/A cmd_tag to stay some time after authentication commands. */ 2028N/A "* BYE Too many invalid IMAP commands.");
2028N/A "Too many invalid commands");
2028N/A "BAD Error in IMAP command received by server.");
2142N/A /* we're not yet connected to auth process - 2142N/A don't allow any commands */ 2142N/A "* OK Waiting for authentication process to respond..");
2142N/A /* find the oldest clients and put them to destroy-buffer */ 2142N/A "Disconnected: Connection queue full");
2028N/A /* reached max. users count, kill few of the 2028N/A /* always use nonblocking I/O */