There seems to be a small problem in the UIDL/Status feature patch
qmail-pop3d-1.03.diff. The problem is that when using the TOP
command, it chops everything off following the added X-UIDL line.
Here is a suggested patch (also includes the extra /r/n patch) (note
"suggested", for example I couldn't figgure out what the
str_diffn(line.s, "-", 5) was supposed to be doing (yes, looks
like a part separater, but that would only be one _possible_ sep of
an infinite number (and no, it's not RFC-934, that would only be
one dash) so I whacked it out. I guess "--" would make more sense
if he really did intend it to detect a part sepr. Anyway, I'll dig up
the authors and drop them a note, maybe they can tell me.
*** /usr/staff/nabil/qmail-pop3d.c Sun Jun 27 09:07:28 1999
--- qmail-pop3d.c Wed Jul 21 19:40:02 1999
***
*** 123,134
if (!match !line.len) break;
if (match) --line.len; /* no way to pass this info over POP */
if (limit) if (!inheaders) if (!--limit) break;
! if (!line.len || !str_diffn(line.s, "Content-Type: ", 14) || !str_diffn(line.s,
"-", 5) )
{
/* add our status notification here... */
#if defined(USE_STATUS_HEADER) || defined(USE_XUIDL_HEADER)
- if (!extradone (inheaders || !str_diffn(line.s, "Content-Type: ", 14) ||
!str_diffn(line.s, "-", 5) ))
- {
#ifdef USE_STATUS_HEADER
if (m[i].flagread)
put("Status: RO\r\n",12);
--- 123,132
if (!match !line.len) break;
if (match) --line.len; /* no way to pass this info over POP */
if (limit) if (!inheaders) if (!--limit) break;
! if (inheaders !extradone (!line.len || !str_diffn(line.s, "Content-Type:
", 14)))
{
/* add our status notification here... */
#if defined(USE_STATUS_HEADER) || defined(USE_XUIDL_HEADER)
#ifdef USE_STATUS_HEADER
if (m[i].flagread)
put("Status: RO\r\n",12);
***
*** 141,150
put("\r\n",2);
#endif
extradone = 1;
- }
#endif
- inheaders = 0;
}
else
if (line.s[0] == '.')
put(".",1);
--- 139,148
put("\r\n",2);
#endif
extradone = 1;
#endif
}
+ if (!line.len)
+ inheaders = 0;
else
if (line.s[0] == '.')
put(".",1);
***
*** 152,158
put("\r\n",2);
if (!match) break;
}
! put("\r\n.\r\n",5);
flush();
}
--- 150,156
put("\r\n",2);
if (!match) break;
}
! put(".\r\n",3);
flush();
}
--
Aaron Nabil