Index: src/auth/userdb-vpopmail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-vpopmail.c,v
retrieving revision 1.21.2.4
diff -u -r1.21.2.4 userdb-vpopmail.c
--- src/auth/userdb-vpopmail.c	14 Mar 2007 11:52:34 -0000	1.21.2.4
+++ src/auth/userdb-vpopmail.c	28 Mar 2007 19:34:51 -0000
@@ -65,6 +65,11 @@
 		return;
 	}
 
+	if (auth_request->successful) {
+		/* update the last login only when we're really  */
+		vset_lastauth(vpop_user, vpop_domain, auth_request->service);
+	}
+
 	if (vpw->pw_dir == NULL || vpw->pw_dir[0] == '\0') {
 		/* user's homedir doesn't exist yet, create it */
 		auth_request_log_info(auth_request, "vpopmail",
