From owner-freebsd-isp Wed Nov 3 17:34: 4 1999 Delivered-To: freebsd-isp@freebsd.org Received: from staff.accessus.net (staff.accessus.net [209.145.151.3]) by hub.freebsd.org (Postfix) with ESMTP id 968241513C for ; Wed, 3 Nov 1999 17:33:58 -0800 (PST) (envelope-from doogie@staff.accessus.net) Received: by staff.accessus.net with Internet Mail Service (5.5.2650.21) id ; Wed, 3 Nov 1999 19:33:42 -0600 Message-ID: From: Jason Young To: 'Leif Neland' , freebsd-isp@FreeBSD.ORG Subject: RE: Query pop3-server of progress Date: Wed, 3 Nov 1999 19:33:41 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF2664.A086AC0E" Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF2664.A086AC0E Content-Type: text/plain; charset="iso-8859-1" qpopper contains some debug functionality. Make sure it's compiled with the DEBUG option, and then if you suspect something's wrong, switch your inetd configuration from "popper -options" to "popper -options -d" and you'll get complete session traces shoveled into syslog. Be sure to have syslog send the data somewhere, I don't think it does by default. That's what I've been doing when I've been trying to figure out various popper problems or customer complaints. I found a bug in the latest version where it truncates long lines that some mailers send (commonly HTML versions of a message in attachments) and then puts the termination character on the end of a line instead of on a line by itself. That generated a lot of support calls about apparently okay messages blocking up their mailbox and having to be removed. Their mail client would hang and eventually time out because of the protocol desync - popper's waiting for a command, client is waiting for more mail. I'm 95% sure this applies to all poppers, but our local one is hacked to handle qmail maildir so I'm not sure. You can tell if this is causing a particular hang by doing POP3 protocol by hand by telnetting to port 110 and retr'ing the message in question, and seeing if the terminating '.' character doesn't get put on a line by itself. I hacked around it, but haven't gotten around to attempting a proper fix yet. If you really wanted status info exactly like you described below, and felt like doing a little hacking on qpopper, I'd use 'setproctitle' to express status info. It could show something like this: # ps -ax 77290 ?? Ss 0:17.06 popper: waiting for command (popper) 77291 ?? Ss 0:17.06 popper: sending msg 29 (74%) (popper) 77292 ?? Ss 0:17.06 popper: updating mailbox (popper) Sendmail and some FTP daemons do this. Be sure to also update the status line when it's spending time in the update phase copying around mailbox data. Hmm, I might just do that myself now that the idea's out there. :) Jason Young accessUS Chief Network Engineer > -----Original Message----- > From: Leif Neland [mailto:leif@neland.dk] > Sent: Wednesday, November 03, 1999 4:49 PM > To: freebsd-isp@FreeBSD.ORG > Subject: Query pop3-server of progress > > > Sometimes a customer calls support saying he can't get his > mail from the pop3-server. > > Often it's just because the progress-meter doesn't move very > quickly when his mailbox contains an 8MB-attachment > containing a funny avi a 'friend' has sent him. > > We're using qpopper, but wouldn't mind changing if something > else could provide this. > > Could this be implemented, and has somebody done it? > > pid=`ps axuw|grep popper|grep $username|grep -v grep` > kill -USR1 $pid > sleep 5 > cat /tmp/popstat.$pid > > The pop3-server should dump some stats in a file, > eg number of files sent and total > number of bytes sent and total > perhaps even transfer speed and eta. > > This could be accessed from a cgi > > Good idea, right? :-) > > Leif > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message > ------_=_NextPart_001_01BF2664.A086AC0E Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: Query pop3-server of progress

qpopper contains some debug functionality. Make sure = it's compiled with the DEBUG option, and then if you suspect = something's wrong, switch your inetd configuration from "popper = -options" to "popper -options -d" and you'll get = complete session traces shoveled into syslog. Be sure to have syslog = send the data somewhere, I don't think it does by default. That's what = I've been doing when I've been trying to figure out various popper = problems or customer complaints.

I found a bug in the latest version where it = truncates long lines that some mailers send (commonly HTML versions of = a message in attachments) and then puts the termination character on = the end of a line instead of on a line by itself.  That generated = a lot of support calls about apparently okay messages blocking up their = mailbox and having to be removed. Their mail client would hang and = eventually time out because of the protocol desync - popper's waiting = for a command, client is waiting for more mail. I'm 95% sure this = applies to all poppers, but our local one is hacked to handle qmail = maildir so I'm not sure.

You can tell if this is causing a particular hang by = doing POP3 protocol by hand by telnetting to port 110 and retr'ing the = message in question, and seeing if the terminating '.' character = doesn't get put on a line by itself. I hacked around it, but haven't = gotten around to attempting a proper fix yet.

If you really wanted status info exactly like you = described below, and felt like doing a little hacking on qpopper, I'd = use 'setproctitle' to express status info. It could show something like = this:

# ps -ax
77290  ??  Ss     = 0:17.06 popper: waiting for command (popper)
77291  ??  Ss     = 0:17.06 popper: sending msg 29 (74%) (popper)
77292  ??  Ss     = 0:17.06 popper: updating mailbox (popper)

Sendmail and some FTP daemons do this. Be sure to = also update the status line when it's spending time in the update phase = copying around mailbox data. Hmm, I might just do that myself now that = the idea's out there. :)

Jason Young
accessUS Chief Network Engineer

> -----Original Message-----
> From: Leif Neland [mailto:leif@neland.dk]
> Sent: Wednesday, November 03, 1999 4:49 = PM
> To: freebsd-isp@FreeBSD.ORG
> Subject: Query pop3-server of progress
>
>
> Sometimes a customer calls support saying he = can't get his
> mail from the pop3-server.
>
> Often it's just because the progress-meter = doesn't move very
> quickly when his mailbox contains an = 8MB-attachment
> containing a funny avi a 'friend' has sent = him.
>
> We're using qpopper, but wouldn't mind changing = if something
> else could provide this.
>
> Could this be implemented, and has somebody = done it?
>
> pid=3D`ps axuw|grep popper|grep $username|grep = -v grep`
> kill -USR1 $pid
> sleep 5
> cat /tmp/popstat.$pid
>
>  The pop3-server should dump some stats in = a file,
> eg number of files sent and total
> number of bytes sent and total
> perhaps even transfer speed and eta.
>
> This could be accessed from a cgi
>
> Good idea, right? :-)
>
> Leif

>
>
>
> To Unsubscribe: send mail to = majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the = body of the message
>

------_=_NextPart_001_01BF2664.A086AC0E-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message