On Tue, 2010-11-16 at 10:30 -0600, Rick Romero wrote:
So I modified my vpopmail install to write an additional field into the lastauth table. My custom vpopmail writes the remote IP into remote_ip, and the auth type into a 'type' field. I tested with qmail's POP3 daemon to verify vchkpw would fill the table correcly.
But I'm not sure how to get dovecot to do it:
I know this is close, but there is something not right in src/auth/userdb-vpopmail.c line 99. vset_lastauth(vpop_user, vpop_domain, &auth_request->remote_ip, t_strdup_noconst(auth_request->service));
You need to modify vpopmail's vset_lastauth() function to actually support this.
Once you do have the extra field (const char *ip) added, you can use:
vset_lastauth(vpop_user, vpop_domain, net_ip2addr(&auth_request->remote_ip), t_strdup_noconst(auth_request->service));
Or maybe you could use vchkpw with Dovecot too via passdb checkpassword?