common.h revision 2c776fc36328447eea694ce01401d57b414911e0
a11689fe3fbb3bca11b9cb4ae5faf27db96401ccTimo Sirainen#ifndef __COMMON_H
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#define __COMMON_H
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#include "lib.h"
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#include "client.h"
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen/* Disconnect client after idling this many seconds */
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#define CLIENT_IDLE_TIMEOUT (60*30)
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen
ec1a4f4306496380e9d96ee08a3718a669d0875aTimo Sirainen/* RFC-2683 recommends at least 8000 bytes. Some clients however don't
1358e2c58ce29231485a5cfa454756d429ad3d2cTimo Sirainen break large message sets to multiple commands, so we're pretty liberal
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen by default. */
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#define DEFAULT_IMAP_MAX_LINE_LENGTH 65536
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen#define DEFAULT_MAX_CUSTOM_FLAG_LENGTH 50
a78d5bd9772681a232de56b3dd6acefee66cc71bTimo Sirainen
a78d5bd9772681a232de56b3dd6acefee66cc71bTimo Sirainenextern struct ioloop *ioloop;
a78d5bd9772681a232de56b3dd6acefee66cc71bTimo Sirainenextern unsigned int max_custom_flag_length, mailbox_check_interval;
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenextern unsigned int imap_max_line_length;
4e0204dbac352e271c79cfa6c74a71145a058de5Timo Sirainenextern enum mailbox_open_flags mailbox_open_flags;
4e0204dbac352e271c79cfa6c74a71145a058de5Timo Sirainen
4e0204dbac352e271c79cfa6c74a71145a058de5Timo Sirainenextern string_t *capability_string;
4e0204dbac352e271c79cfa6c74a71145a058de5Timo Sirainen
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenextern void (*hook_mail_storage_created)(struct mail_storage **storage);
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenextern void (*hook_client_created)(struct client **client);
637ec4c33b4715737a41f7e58c9b6d1f693c27e2Timo Sirainen
637ec4c33b4715737a41f7e58c9b6d1f693c27e2Timo Sirainen#endif
637ec4c33b4715737a41f7e58c9b6d1f693c27e2Timo Sirainen