]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
last-login: Don't execute last_login on IMAP unhibernation.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Oct 2016 14:37:27 +0000 (17:37 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 13 Oct 2016 08:26:11 +0000 (10:26 +0200)
src/plugins/last-login/last-login-plugin.c

index 44a17b322cfe76b6e003aaa0181a25c950ead3a5..82bb6e99d1d70c107afd096aae37a4c52e299f6b 100644 (file)
@@ -84,6 +84,10 @@ static void last_login_mail_user_created(struct mail_user *user)
                   not lda's raw user or accessed shared users */
                return;
        }
+       if (user->session_restored) {
+               /* This is IMAP unhibernation, not a real login. */
+               return;
+       }
 
        dict_value = mail_user_plugin_getenv(user, "last_login_dict");
        if (dict_value == NULL || dict_value[0] == '\0')