Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Nov 1999 19:33:41 -0600 
From:      Jason Young <doogie@staff.accessus.net>
To:        'Leif Neland' <leif@neland.dk>, freebsd-isp@FreeBSD.ORG
Subject:   RE: Query pop3-server of progress
Message-ID:  <ABD44D466F85D311A69900A0C900DB6BC4DA@staff.accessus.net>

next in thread | raw e-mail | index | archive | help
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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>RE: Query pop3-server of progress</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=3D2>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 &quot;popper =
-options&quot; to &quot;popper -options -d&quot; 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.</FONT></P>

<P><FONT SIZE=3D2>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.&nbsp; 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.</FONT></P>

<P><FONT SIZE=3D2>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.</FONT></P>

<P><FONT SIZE=3D2>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:</FONT></P>

<P><FONT SIZE=3D2># ps -ax</FONT>
<BR><FONT SIZE=3D2>77290&nbsp; ??&nbsp; Ss&nbsp;&nbsp;&nbsp;&nbsp; =
0:17.06 popper: waiting for command (popper)</FONT>
<BR><FONT SIZE=3D2>77291&nbsp; ??&nbsp; Ss&nbsp;&nbsp;&nbsp;&nbsp; =
0:17.06 popper: sending msg 29 (74%) (popper)</FONT>
<BR><FONT SIZE=3D2>77292&nbsp; ??&nbsp; Ss&nbsp;&nbsp;&nbsp;&nbsp; =
0:17.06 popper: updating mailbox (popper)</FONT>
</P>

<P><FONT SIZE=3D2>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. :)</FONT></P>

<P><FONT SIZE=3D2>Jason Young</FONT>
<BR><FONT SIZE=3D2>accessUS Chief Network Engineer</FONT>
</P>

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

</BODY>
</HTML>
------_=_NextPart_001_01BF2664.A086AC0E--


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ABD44D466F85D311A69900A0C900DB6BC4DA>