#include <time.h>
#define PENALTY_DEFAULT_EXPIRE_SECS (60*60)
-#define PENALTY_CHECKSUM_SAVE_COUNT
#define CHECKSUM_VALUE_COUNT 2
#define CHECKSUM_VALUE_PTR_COUNT 10
#define OUTBUF_THROTTLE_SIZE (1024*10)
#define CLIENT_STATE_HANDSHAKE "handshaking"
-#define CLIENT_STATE_ITER "iterating users"
#define CLIENT_STATE_IDLE "idling"
#define CLIENT_STATE_STOP "waiting for shutdown"
#include "passdb.h"
-#define MAX_REALM_LEN 64
-
/* Linear whitespace */
#define IS_LWS(c) ((c) == ' ' || (c) == '\t')
#include <unistd.h>
#include <sys/wait.h>
-#define DEFAULT_WINBIND_HELPER_PATH "/usr/bin/ntlm_auth"
-
enum helper_result {
HR_OK = 0, /* OK or continue */
HR_FAIL = -1, /* authentication failed */
#define DIRECTOR_RECONNECT_AFTER_WRONG_CONNECT_MSECS 1000
#define DIRECTOR_WAIT_DISCONNECT_SECS 10
#define DIRECTOR_HANDSHAKE_WARN_SECS 29
-#define DIRECTOR_HANDSHAKE_BYTES_LOG_MIN_SECS (60*30)
#define DIRECTOR_MAX_SYNC_SEQ_DUPLICATES 4
/* If we receive SYNCs with a timestamp this many seconds higher than the last
valid received SYNC timestamp, assume that we lost the director's restart
#include "doveadm-print.h"
#include "doveadm-mail.h"
-#define DOVEADM_SERVER_CONNECTIONS_MAX 4
#define DOVEADM_SERVER_QUEUE_MAX 16
#define DOVEADM_MAIL_SERVER_FAILED() \
/* Disconnect client after idling this many milliseconds */
#define CLIENT_IDLE_TIMEOUT_MSECS (10*60*1000)
-#define USER_EXECUTABLE "imap-urlauth-worker"
-
#define IS_STANDALONE() \
(getenv(MASTER_IS_PARENT_ENV) == NULL)
#include <unistd.h>
#include <sysexits.h>
-#define MAX_CTRL_HANDSHAKE 255
-
/* max. length of input lines (URLs) */
#define MAX_INBUF_SIZE 2048
#include "worker-connection.h"
#include "worker-pool.h"
-#define MAX_WORKER_IDLE_SECS (60*5)
-
struct worker_pool {
char *socket_path;
indexer_status_callback_t *callback;
ISTREAM_DECOMPRESS_FLAG_TRY = BIT(0),
};
-/* Compressed input is always detected once at maximum this many bytes have
- been read. This value must be smaller than a typical istream max buffer
- size. */
-#define COMPRESSION_HDR_MAX_SIZE 128
-
struct compression_handler {
const char *name;
const char *ext;
#include <arpa/inet.h>
-#define ISTREAM_DECRYPT_READ_FIRST 15
-
struct decrypt_istream_snapshot {
struct istream_snapshot snapshot;
struct decrypt_istream *dstream;
#include <unistd.h>
#define TEST_SOCKET_NAME ".test-dns-server"
-#define TEST_CACHE_TTL 4
static const struct {
const char *name;
#include "ostream.h"
#include "fs-sis-common.h"
-#define QUEUE_DIR_NAME "queue"
-
struct sis_queue_fs {
struct fs fs;
char *queue_dir;
#include "nfs-workarounds.h"
#include "mail-index-private.h"
-#define MAIL_INDEX_SHARED_LOCK_TIMEOUT 120
-
int mail_index_lock_fd(struct mail_index *index, const char *path, int fd,
int lock_type, unsigned int timeout_secs,
struct file_lock **lock_r)
uint32_t crc32;
};
-/* number of bytes required to store one string idx */
-#define STRMAP_FILE_STRIDX_SIZE (sizeof(uint32_t)*2)
-
/* renumber the string indexes when highest string idx becomes larger than
<number of indexes>*STRMAP_FILE_MAX_STRIDX_MULTIPLIER */
#define STRMAP_FILE_MAX_STRIDX_MULTIPLIER 2
static int sync_header_update(const struct mail_transaction_header_update *u,
struct mail_index_sync_map_ctx *ctx)
{
-#define MAIL_INDEX_HEADER_UPDATE_FIELD_IN_RANGE(u, field) \
- ((u)->offset <= offsetof(struct mail_index_header, field) && \
- (u)->offset + (u)->size > offsetof(struct mail_index_header, field))
struct mail_index_map *map = ctx->view->map;
uint32_t orig_log_file_tail_offset = map->hdr.log_file_tail_offset;
uint32_t orig_next_uid = map->hdr.next_uid;
#include <stdio.h>
-#define MAIL_INDEX_MIN_UPDATE_SIZE 1024
-/* if we're updating >= count-n messages, recreate the index */
-#define MAIL_INDEX_MAX_OVERWRITE_NEG_SEQ_COUNT 10
-
static int mail_index_create_backup(struct mail_index *index)
{
const char *backup_path, *tmp_backup_path;
#include <ldap.h>
-#define DOVE_LDAP_CONTINUE 0
-#define DOVE_LDAP_COMPLETE 1
-#define DOVE_LDAP_REQUEUE 2
-
struct ldap_connection;
struct ldap_result;
*/
-#define MINIMUM_SERIALIZED_SIZE \
- (sizeof(unsigned int) + sizeof(uoff_t) * 4)
-
struct deserialize_context {
pool_t pool;
const unsigned char *data, *end;
#include "smtp-client-transaction.h"
#include "smtp-client-connection.h"
-#define SMTP_CLIENT_DATA_CHUNK_SIZE IO_BLOCK_SIZE
-
struct smtp_client_command {
pool_t pool;
int refcount;
#include "smtp-client-private.h"
-#define SMTP_DEFAULT_PORT 80
-#define SSMTP_DEFAULT_PORT 465
-
static struct event_category event_category_smtp_client = {
.name = "smtp-client"
};
#include "smtp-server.h"
-#define SMTP_SERVER_COMMAND_POOL_MAX (8 * 1024)
-
-#define SMTP_SERVER_DEFAULT_MAX_COMMAND_LINE (4 * 1024)
#define SMTP_SERVER_DEFAULT_MAX_BAD_COMMANDS 10
#define SMTP_SERVER_DEFAULT_MAX_SIZE_EXCESS_LIMIT (1024*1024)
#include <time.h>
-#define QUERY_TIMEOUT_SECS 6
-
/* sqlpool events are separate from category:sql, because
they are usually not very interesting, and would only
make logging too noisy. They can be enabled explicitly.
#define DBOX_ALT_SYMLINK_NAME "dbox-alt-root"
#define DBOX_MAILBOX_DIR_NAME "mailboxes"
-#define DBOX_TRASH_DIR_NAME "trash"
#define DBOX_MAILDIR_NAME "dbox-Mails"
/* Delete temp files having ctime older than this. */
#define MAX_BACKWARDS_LOOKUPS 10
-#define DBOX_FORCE_PURGE_MIN_BYTES (1024*1024*10)
-#define DBOX_FORCE_PURGE_MIN_RATIO 0.5
-
#define MAP_STORAGE(map) (&(map)->storage->storage.storage)
struct mdbox_map_transaction_context {
#include <sys/stat.h>
-#define MAILDIR_LIST_CONTEXT(obj) \
- MODULE_CONTEXT(obj, maildir_mailbox_list_module)
#define MAILDIR_SUBFOLDER_FILENAME "maildirfolder"
struct maildir_mailbox_list_context {
#define MAILDIR_FLAGS_SEP ','
#define MAILDIR_INFO_SEP_S ":"
-#define MAILDIR_EXTRA_SEP_S ","
#define MAILDIR_FLAGS_SEP_S ","
/* ":2," is the standard flags separator */
#include <dirent.h>
#include <sys/stat.h>
-#define MAILDIR_FILENAME_FLAG_FOUND 128
-
/* When rename()ing many files from new/ to cur/, it's possible that next
readdir() skips some files. we don't of course wish to lose them, so we
go and rescan the new/ directory again from beginning until no files are
/* How often to touch the dotlock file when using KEEP_LOCKED flag */
#define MBOX_LOCK_TOUCH_MSECS (10*1000)
-/* Assume that if atime < mtime, there are new mails. If it's good enough for
- UW-IMAP, it's good enough for us. */
-#define STAT_GET_MARKED(st) \
- ((st).st_size == 0 ? MAILBOX_UNMARKED : \
- (st).st_atime < (st).st_mtime ? MAILBOX_MARKED : MAILBOX_UNMARKED)
-
#define MBOX_LIST_CONTEXT(obj) \
MODULE_CONTEXT_REQUIRE(obj, mbox_mailbox_list_module)
MAIL_DUPLICATE_CHECK_RESULT_DEADLOCK,
};
-#define MAIL_DUPLICATE_DEFAULT_KEEP (3600 * 24)
-
struct mail_duplicate_transaction *
mail_duplicate_transaction_begin(struct mail_duplicate_db *db);
void mail_duplicate_transaction_rollback(
#define MAX_TIME_BACKWARDS_SLEEP_MSECS (5*1000)
#define MAX_NOWARN_FORWARD_MSECS (10*1000)
-#define ERRSTR_INVALID_USER_SETTINGS \
- "Invalid user settings. Refer to server log for more information."
-
struct mail_storage_service_privileges {
uid_t uid;
gid_t gid;
#include <unistd.h>
#include <fcntl.h>
-#define DEFAULT_LOCK_TIMEOUT 120
-
struct file_lock;
struct dotlock;
#include "iostream-rawlog.h"
-#define IOSTREAM_RAWLOG_MAX_PREFIX_LEN 3
-
struct rawlog_iostream {
struct iostream_private *iostream;
enum iostream_rawlog_flags flags;
#include <unistd.h>
-#define BUF_INITIAL_SIZE (1024*32)
-
struct seekable_istream {
struct istream_private istream;
comparisons. Note that system CPU usage can grow very large on loaded
systems, so we're not checking its upper limit at all. */
#define ALLOW_MSECS_BELOW 500
-#define ALLOW_MSECS_ABOVE 3000
static const char *const test_path = ".test.cpulimit";
#define LBase 0x1100
#define VBase 0x1161
#define TBase 0x11A7
-#define LCount 19
#define VCount 21
#define TCount 28
#define NCount (VCount * TCount)
#include "net.h"
#include "smtp-server.h"
-#define CLIENT_MAIL_DATA_MAX_INMEMORY_SIZE (1024*128)
-
struct master_service_connection;
struct mail_storage;
struct mail_deliver_context;
#include <stdio.h>
#include <unistd.h>
-#define FATAL_QUEUE_TIMEOUT_MSECS 500
#define MAX_MSECS_PER_CONNECTION 100
/* Log a warning after 1 secs when we've been all the time busy writing the
#define LOGIN_PROXY_DIE_IDLE_SECS 2
#define LOGIN_PROXY_KILL_PREFIX "Disconnected by proxy: "
#define KILLED_BY_ADMIN_REASON "Kicked by admin"
-#define KILLED_BY_DIRECTOR_REASON "Kicked via director"
#define KILLED_BY_SHUTDOWN_REASON "Process shutting down"
#define LOGIN_PROXY_SIDE_SELF "proxy"
/* Wait this long before retrying on reconnect */
IMAP ACLs define only 10 standard rights and 10 user-defined rights. */
#define DEFAULT_ACL_RIGHTS_COUNT 64
-#define ACL_GLOBAL_COUNT 2
-
struct acl_object_cache {
char *name;
#include "acl-shared-storage.h"
#include "acl-plugin.h"
-#define MAILBOX_FLAG_MATCHED 0x40000000
-
struct acl_mailbox_list_iterate_context {
union mailbox_list_iterate_module_context module_ctx;
#include "imap-zlib-plugin.h"
-#define IMAP_COMPRESS_DEFAULT_LEVEL 6
-
#define IMAP_ZLIB_IMAP_CONTEXT(obj) \
MODULE_CONTEXT_REQUIRE(obj, imap_zlib_imap_module)
{
#define MAXU64 (uint64_t)-1
#define MAXS64 9223372036854775807LL
-#define MINS64 (-MAXS64 - 1LL)
static const struct test tests[] = {
/* first test only with new_size=1. these are used for both
count and bytes tests: */
#define REPLICATION_SOCKET_NAME "replication-notify"
#define REPLICATION_FIFO_NAME "replication-notify-fifo"
#define REPLICATION_NOTIFY_DELAY_MSECS 500
-#define REPLICATION_SYNC_TIMEOUT_SECS 10
#define REPLICATION_USER_CONTEXT(obj) \
MODULE_CONTEXT(obj, replication_user_module)