lmtpd NUL rejection
simon.brady at otago.ac.nz
simon.brady at otago.ac.nz
Mon Jan 13 23:24:17 EST 2003
On Fri, 10 Jan 2003, Igor Brezac wrote:
> Have you tried F=1 mailer flag? This may only work in Sendmail 8.12.x.
>
> From op.txt:
>
> 1 Don't send null characters ('\0') to this mailer.
We've gone live with 8.12.7, and F=1 is doing just what we hoped for:
silently deleting NULs in transit. Thanks again for the pointer.
Along the way, I've discovered a related bug in lmtpd (2.1.11). If a
misconfigured client sends a message with lines longer than 8190 chars,
the following code in imap/lmtpengine.c (lines 672-675) will incorrectly
report the presence of NULs:
else if (p[0] != '\n') {
/* line contained a \0 not at the end */
r = IMAP_MESSAGE_CONTAINSNULL;
continue;
(It assumes all lines end with '\n', which prot_fgets() doesn't
guarantee.)
I'm not sure what the right fix is for this. It's trivial to identify the
long-line case, but should lmtpd return an error (and if so, what?), or
should it try to handle this pathological case?
--
Simon Brady mailto:simon.brady at otago.ac.nz
ITS Technical Services
University of Otago, Dunedin, New Zealand
More information about the Info-cyrus
mailing list