passdb-imap.c revision b5bdc43c496bd4e011fb4d4144b0e9d4a1bf8cc6
/* Copyright (c) 2011-2012 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "passdb.h"
#include "str.h"
#include "var-expand.h"
#include "imap-resp-code.h"
#include "imapc-client.h"
#define IMAP_DEFAULT_PORT 143
#define IMAPS_DEFAULT_PORT 993
#define DNS_CLIENT_SOCKET_NAME "dns-client"
struct imap_passdb_module {
struct passdb_module module;
struct imapc_client_settings set;
bool set_have_vars;
};
struct imap_auth_request {
struct imapc_client *client;
struct auth_request *auth_request;
};
static enum passdb_result
{
return PASSDB_RESULT_PASSWORD_MISMATCH;
return PASSDB_RESULT_PASSWORD_MISMATCH;
return PASSDB_RESULT_PASS_EXPIRED;
return PASSDB_RESULT_INTERNAL_FAILURE;
}
static void
void *context)
{
case IMAPC_COMMAND_STATE_OK:
break;
case IMAPC_COMMAND_STATE_NO:
break;
case IMAPC_COMMAND_STATE_BAD:
break;
}
}
static void
const char *password,
{
struct imap_passdb_module *module =
(struct imap_passdb_module *)_module;
struct imap_auth_request *request;
struct imapc_client_settings set;
const struct var_expand_table *table;
if (module->set_have_vars) {
str_truncate(str, 0);
}
request);
}
static struct passdb_module *
{
struct imap_passdb_module *module;
char **tmp;
value = "";
else
if (!port_set)
} else {
i_fatal("passdb imap: Invalid ssl mode: %s",
value);
}
} else {
}
}
i_fatal("passdb imap: Missing host parameter");
}
static struct passdb_module_interface passdb_imap_plugin = {
"imap",
NULL,
NULL,
NULL,
};
void authdb_imap_init(void);
void authdb_imap_deinit(void);
void authdb_imap_init(void)
{
}
void authdb_imap_deinit(void)
{
}