David Gartner <[EMAIL PROTECTED]> wrote:
> Just switched to qmail and have a slight problem. We used to log pop3
> traffic (logins/logouts) so that we could help people who claim they
> couldn't get their mail. Basically, so we could verify they were even
> reaching the server. I noticed with qmail (also using tcpserver)
> doesn't log that by default. Anyone know how I can log attempts similar
> to how sendmail did? In case anyone's confused about what I'm talking
> about, here's a sample of the log sendmail keeps.
>
> May 23 08:30:21 mail ipop3d[12955]: Login user=USERNAME host=HOST
> [IPADDRESS] nmsgs=0/0
> May 23 08:30:21 mail ipop3d[12955]: Logout user=USERNAME host=HOST
> [IPADDRESS] nmsgs=0 ndele=0
The login line can be done fairly easily with a shell script shim called right
after your checkpassword (or alternative) invocation in the qmail-pop3d run
script. This little script should just log the username (from $USER or other
information, depending on your checkpassword) and then exec it's arg(s).
Someone else posted a script to this list last week that did exactly this.
For logging the logout; well, you'll probably have to patch qmail-pop3d to do
this.
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <[EMAIL PROTECTED]>
GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
-----------------------------------------------------------------------