On 23 May 2001, at 8:33, David Gartner 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
>
> Thanks in advance for any help anyone can provide!
>
Hi David, Welcome to the list...
Before you get flamed by others on the list, just a piece of friendly
advice.... You should search the list archives before posting a
question, chances are it's been covered already.
I know this first hand because I asked the same question last week...
But to save you some time.... Here's my solution... (As posted to
this list)
Best of luck, I hope this helps.
Dean
----begin original message-------
For anyone else who is interested, Here's the final results.
I modified my poplog script tp read as follows...
#! /bin/sh
newmail=`ls $HOME/Maildir/new/ | wc -l`
newmailbytes=`du -sb $HOME/Maildir/new/ | cut -f 1`
echo "$TCPREMOTEIP" "$USER" "$newmail" "$newmailbytes" |
/var/qmail/bin/splogger pop3d 19
pop="$1"; shift; exec "$pop" "$@"
I'm running a distor based on RedHat 7 so the pop3d daemon is called
from xinetd. So the /etc/xinetd.conf file has a pop3 section that
reads as follows....
service pop-3
{
socket_type = stream
user = root
wait = no
server = /var/qmail/bin/qmail-popup
server_args = localhost /bin/checkpassword /var/qmail/bin/poplog
/var/qmail/bin/qmail-pop3d Maildir
}
Next, I edit the /etc/syslog.conf so the line for local3 reads...
local3.*
/var/log/popper.log
And finally with all this I get a /var/log/popper.log that has the
following...
May 17 11:54:01 testmail pop3d: 990114841.105074 dean 4 20480
May 17 12:01:42 testmail pop3d: 990115302.090064 dean 12 57344
I hope this helps someone else.
Again Thanks to Charles for his response.
Regards
Dean
----------------end original message----------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Staff
Protus IP Solutions
210 - 2379 Holly Lane
Ottawa, ON K1V 7P2 Canada
613-733-0000 ex 546 Fax 613-248-4553
e-mail: [EMAIL PROTECTED] Web: http://www.protus.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~