last-login-plugin.c revision c4478af52de63804efef2055580adf1dfc8679c6
/* Copyright (c) 2014-2016 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "dict.h"
#include "mail-user.h"
#include "mail-namespace.h"
#include "mail-storage-private.h"
#include "mail-storage-hooks.h"
#include "last-login-plugin.h"
#define LAST_LOGIN_USER_CONTEXT(obj) \
#define LAST_LOGIN_DEFAULT_KEY_PREFIX "last-login/"
struct last_login_user {
};
const char *last_login_plugin_version = DOVECOT_ABI_VERSION;
{
}
/* remove timeout after dict_wait(), which may trigger
last_login_dict_commit() */
}
{
}
{
/* don't deinit the dict immediately here, lib-dict will just crash */
}
{
struct last_login_user *luser;
struct dict_settings set;
struct dict_transaction_context *trans;
if (user->autocreated) {
/* we want to handle only logged in users,
not lda's raw user or accessed shared users */
return;
}
if (dict_value == NULL)
return;
i_error("last_login_dict: dict_init(%s) failed: %s",
dict_value, error);
return;
}
v->deinit = last_login_user_deinit;
}
(unsigned int)ioloop_timeval.tv_usec));
(unsigned int)ioloop_timeval.tv_usec));
} else {
}
}
static struct mail_storage_hooks last_login_mail_storage_hooks = {
};
{
}
void last_login_plugin_deinit(void)
{
}