Hi there,
i've modified vpopmail-4.9.8 do make vchkpw to log the last POP-Access for a user.
It logs
* Username
* Domainname
* Date+Time
* IP-Address
* Resolved IP (if available)
Just compile vpopmail with mysql support , add --enable-logging=y and create the
following table
in the vpopmail-database :
CREATE TABLE lastauth (
user varchar(200) NOT NULL,
domain varchar(255) NOT NULL,
timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
ip varchar(15) NOT NULL,
host varchar(255) NOT NULL,
PRIMARY KEY (user, domain),
KEY user (user, domain)
);
It's maybe not the best way to do it, but it realy works great here at a local ISP
(about 600 Domains).
Just replace the vchkpw.c from the vpopmail-source with the attached one.
I hope that this patch *will* be added to the official vpopmail-distribution (e.g. with
a configure option)
Greets,
Thomas
vchkpw2.c