Hi Moritz!

On Mon, 01 Dec 2025, Moritz Mühlenhoff wrote:

> Package: rancid
> Version: 3.14-1
> Severity: wishlist

> At Wikimedia we use rancid with Juniper hardware and we came across some
> elements of the diff which became so large that Exim refused the mail due to
> overlong lines with "message has lines too long for transport". One example I
> could track down was for setting a TLS key in JunOS.

> We've applied the attached patch to always wrap the generated diff.
> -     ) | $SENDMAIL -t $MAILOPTS
> +     ) | fold -w 80 | $SENDMAIL -t $MAILOPTS

I didn't notice that there is a problem with some mail servers and a
limited line length.  But according to
https://datatracker.ietf.org/doc/html/rfc5322#section-2.1.1 you are
right and the body of a mail should be limited to less than 998
characters per line.

I'm not sure, whether breaking after 80 chars is a good idea, since we
use "show configuration | display set" on our JunOS systems, which
usually results in lines longer than 80 chars but less then 998.
Wouldn't it be better to use fold -w 800 or the like, which breaks
very long lines and avoids issues with Exim while not breaking earlier
than necessary, which may make some output harder than necessary to
read?

Greetings
Roland

Reply via email to