On 18/06/2020 17:17, Dominic Raferd wrote:
On Thu, 18 Jun 2020 at 15:03, Wietse Venema <wie...@porcupine.org> wrote:
Dominic Raferd:
I understand the reason for smtp_line_length_limit and for its default
value of 998, which is of course good.
It breaks DKIM signatures, it is needed only for mail that is sent
via SMTP, and worse, it breaks lines in the middle of a multibyte
character (and of course in the middle of a word, in the middle of
an HTML tag, and so on). So it really shuod not be considered a
reliable solution.

The main reason smtp_line_length_limit exists is to prevent other
MTAs from breaking MIME-formatted mail, where one huge message
header could cause all message content to become exposed in the
underlying encoding (base64 or quoted-printable).

If your problem is with cron job outputs that aren't sent across
the Internet, you could just disable this behavior by setting the
limit to zero, and by configuring other MTAs similarly.

Alternatively, as these cron jobs are under local control, you could
massage their output through a program that fixes long lines.

Thanks for your answer and explanation.

Your second suggestion is what I do, but it is difficult to catch all
instances. I have now followed your first and set the limit to zero
(which I believe is undocumented as a way to turn off automatic
line-breaking). Actually I am relaying into Gmail so it will be
interesting to see if it copes with overlong lines.
For information: setting smtp_line_length_limit = 0 works, however having such a long line (in the mail body) still breaks the DKIM signature. There must be something else going on (presumably unrelated to postfix).

Reply via email to