doveadm-mail.c revision 315aa3cca6a8cbfb0913a32c86512086ddfee48b
0N/A#include "lib-signals.h"
0N/A#include "istream-dot.h"
0N/A#include "istream-seekable.h"
0N/A#include "module-dir.h"
0N/A#include "wildcard-match.h"
0N/A#include "master-service.h"
0N/A#include "mail-user.h"
0N/A#include "mail-namespace.h"
0N/A#include "mail-storage.h"
0N/A#include "mail-storage-settings.h"
1472N/A#include "mail-storage-service.h"
1472N/A#include "mail-storage-hooks.h"
1472N/A#include "mail-search-build.h"
0N/A#include "mail-search-parser.h"
0N/A#include "mailbox-list-iter.h"
0N/A#include "client-connection.h"
1879N/A#include "doveadm-settings.h"
1879N/A#include "doveadm-print.h"
0N/A#include "doveadm-dsync.h"
0N/A#include "doveadm-mail.h"
0N/A doveadm_mail_cmd_module_register = { 0 };
0N/Astatic int killed_signo = 0;
0N/Abool doveadm_is_killed(void)
0N/A return killed_signo != 0;
0N/Aint doveadm_killed_signo(void)
0N/A return killed_signo;
0N/A case MAIL_ERROR_NONE:
0N/A i_unreached();
0N/A case MAIL_ERROR_TEMP:
0N/A case MAIL_ERROR_NOTPOSSIBLE:
0N/A case MAIL_ERROR_EXISTS:
0N/A case MAIL_ERROR_CONVERSION:
0N/A case MAIL_ERROR_INVALIDDATA:
0N/A case MAIL_ERROR_PARAMS:
0N/A case MAIL_ERROR_PERM:
0N/A case MAIL_ERROR_NOQUOTA:
0N/A case MAIL_ERROR_NOTFOUND:
0N/A case MAIL_ERROR_EXPUNGED:
0N/A case MAIL_ERROR_INUSE:
0N/Astruct doveadm_mail_cmd_context *
struct mailbox *
struct mail_search_args *
return sargs;
int ret = 0;
return ret;
int ret = 0;
} T_END;
return ret;
const char *const args[])
return ctx;
const char **error_r)
int ret;
if (ret != 0)
return ret;
if (ret <= 0) {
if (ret < 0) {
error);
return ret;
if (ret < 0) {
return ret;
const char **error_r)
const char *wildcard_user)
unsigned int user_idx;
int ret;
user_idx = 0;
T_BEGIN {
if (ret < 0)
else if (ret == 0)
} T_END;
if (doveadm_verbose) {
if (killed_signo != 0) {
if (doveadm_verbose)
if (ret < 0) {
const char **username_r)
struct doveadm_mail_cmd_context *
return ctx;
static struct doveadm_mail_cmd_context *
if (doveadm_debug)
return ctx;
const char *wildcard_user)
int ret;
const char *error;
if (ret < 0) {
} else if (ret == 0) {
const char *const **argv)
unsigned int len;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
const struct doveadm_mail_cmd *
const char *const **argv)
unsigned int cmd_name_len;
const char *const *orig_argv;
int orig_argc;
return cmd;
return cmd;
return NULL;
return FALSE;
return TRUE;
return cmd;
return NULL;
return TRUE;
return FALSE;
void doveadm_mail_init(void)
&mod_set);
void doveadm_mail_deinit(void)
const char *fieldstr;
unsigned int username_args_count;
if (username_args_count > 0)