On Nov 25 01:38:35, [email protected] wrote: > On Nov 24 14:47:48, [email protected] wrote: > > > > Jan Stary <[email protected]> writes: > > > smtpd just failed to parse a SMTP response (below), > > > saying 'line too long'. > > > > > > Looking at the source, this seems to be parse_smtp_response() in util.c, > > > which errors out right away with > > > > > > if (len >= LINE_MAX) > > > return "line too long"; > > > > > > Apparently, > > > > > > /usr/include/sys/syslimits.h:#define LINE_MAX 2048 > > > > > > is not enough, as shown by this line from > > > (you guessed it) outlook.office365.com: > > > > > There is also > > > > > > smtp_session.c:#define SMTP_LINE_MAX 65535 > > > > > Index: util.c > > > =================================================================== > > > RCS file: /cvs/src/usr.sbin/smtpd/util.c,v > > > retrieving revision 1.154 > > > diff -u -p -r1.154 util.c > > > --- util.c 14 Jun 2021 17:58:16 -0000 1.154 > > > +++ util.c 24 Nov 2021 17:59:14 -0000 > > > @@ -685,9 +685,6 @@ session_socket_error(int fd) > > > const char * > > > parse_smtp_response(char *line, size_t len, char **msg, int *cont) > > > { > > > - if (len >= LINE_MAX) > > > - return "line too long"; > > > - > > > if (len > 3) { > > > if (msg) > > > *msg = line + 4; > > > > [...]
> > At this point it seems to me that changing LINE_MAX to SMTP_LINE_MAX > > would require a bit more digging, and I didn't look into any RFCs for > > whether this is a standard value that outlook is ignoring. https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1 https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1.5 I have no idea what the server is trying to say with the long reply. Jan
