[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference lassie::ucx

Title:DEC TCP/IP Services for OpenVMS
Notice:Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System
Moderator:ucxaxp.ucx.lkg.dec.com::TIBBERT
Created:Thu Nov 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5568
Total number of notes:21492

4836.0. "POP removes 255th character of long email text" by CSC32::M_MENKHUS (Mark Menkhus (719)531-5853 (basement)) Mon Oct 28 1996 18:13

T.RTitleUserPersonal
Name
DateLines
4836.1Similar problem ... with DS90M and you ?LEMAN::SCHEIDEGGERRaymond @GEO - DTN 821-5236Fri Jan 17 1997 06:1113
4836.2pop, that's the way it worksCSC32::M_MENKHUSMark Menkhus (719)531-5853 @home)Wed Feb 26 1997 22:0010
    Hi,
    
    I think the pop server may be having a problem with greater than 255
    char lines, because vms mail has the smae problem.
    
    The problem with your ftp'es may be caused by a modem problem.  I had a
    very similar problem, and I swapped out the modem and the problem went
    away!
    
    			-Mark Menkhus
4836.3UCXAXP::ZIELONKOTue Mar 04 1997 12:1349
Mark,

We picked this case off the Usenet UCX newsgroup last week. Ken Kriesel at the U
of Wisc was the person who reported the problem. He very carefully analyzed the
problem and showed that it was a POP server problem - spoon fed us basically.
It's great to have customers like that.

Anyway. I fixed the problem and sent the fix to the U of Wisc for testing. They
are going to get back to me. (I know the problem is fixed though since I tested
it here and we can now see the 255th character where we couldn't before.)

Ken is aware of the VMSmail 255 character line limit and says his applications
are not hurt by it. (When UCX SMTP sees a line of text greater than 255
characters it breaks it up into multiple lines which it delivers to VMSmail.)

Yesterday I built UCX V4.1 ECO images for SMTP and POP and this fix is in there
so it will go out with the next V4.1 ECO.

For those who care here is the explanation of the problem:

When reading the lines of text from VMS mail the POP server uses a buffer sized
to 256 bytes. The buffer size it passes to VMS mail is sizeof(buffer)-2. The -2
is for the CRLF that must be tacked on before sending to the POP client.

Problem 1 is that only leaves 254 characters for text from VMSmail.
Unfortunately the text coming back from VMSmail has a maximum of 255. (VMS mail
does however impose a limit of 255 characters per line.)

Problem 2 is that when we fill the 254 characters the code procedes to append
the CRLF which fills the buffer (ie. the LF is in the 256th slot or
buffer[255]). Then the code adds a closing '\0' and in doing so goes off the end
of the buffer and tromps on some other data.

Problem 3. The POP protocol requires that if a line begins with the '.'
character the POP server must prepend an additional '.' character to the
beginning of the line so there's another thing that's not accounted for. If
theline begins with a '.' and is also 255 characters long we need space for that
extra '.' character.

In short the buffer is 256 bytes but it needs to be

   255
   + 1 for null terminator
   + 1 for extra '.'
   + 2 for CRLF
   ---
   259 bytes not 256 bytes.

Karol Zielonko