/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ostream.h"
#include "connection.h"
#include "restrict-access.h"
#include "settings-parser.h"
#include "master-service.h"
#include "master-service-settings.h"
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-storage-settings.h"
#include "mail-storage-service.h"
#include "smtp-address.h"
#include "quota-private.h"
#include "quota-plugin.h"
#include "quota-status-settings.h"
enum quota_protocol {
};
struct quota_client {
};
static char *nouser_reply;
{
}
{
}
static enum quota_alloc_result
{
/* no quota for user */
return QUOTA_ALLOC_RESULT_OK;
}
const char *internal_error;
if (ret == QUOTA_ALLOC_RESULT_TEMPFAIL)
mailbox_free(&box);
return ret;
}
{
int ret;
return;
}
&detail);
if (ret == 0) {
} else if (ret > 0) {
&error);
switch (qret) {
case QUOTA_ALLOC_RESULT_OK: /* under quota */
"quota_status_success");
value = "OK";
break;
/* even over maximum quota */
"quota_status_toolarge");
/* fall through */
"quota_status_overquota");
break;
ret = -1;
break;
}
} else {
error = "Temporary internal error";
}
if (ret < 0) {
/* temporary failure */
"action=DEFER_IF_PERMIT %s\n\n", error));
} else {
}
}
{
const char *error;
if (*line == '\0') {
return 1;
}
i_error("quota-status: "
"Client sent invalid recipient address: %s",
error);
return 0;
}
}
return 1;
}
{
}
};
};
static void main_preinit(void)
{
}
static void main_init(void)
{
};
&user_info, &set_parser,
&error) < 0)
set_parser)[0];
pool_unref(&pool);
}
static void main_deinit(void)
{
}
{
int c;
while ((c = master_getopt(master_service)) > 0) {
switch (c) {
case 'p':
else
break;
default:
return FATAL_DEFAULT;
}
}
if (protocol == QUOTA_PROTOCOL_UNKNOWN)
i_fatal("Missing -p parameter");
main_preinit();
main_init();
main_deinit();
return 0;
}