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. The sendmail command is a bad place for doing this, why not the cleanup daemon? Wietse ----- > But it is an occasional problem for me that this wrapping action is > only applied at smtp stage and not earlier; in particular it is after > any (open)dkim milter adds its key, because smtp's wrapping means that > the key then becomes invalid. > > The standard answer would be that it is the responsibility of an MUA > to ensure that emails do not break the RFC, so then smtp would not > have to fix a problem that is not of its own making. > > But postfix's sendmail does not honour the RFC or the > smtp_line_length_limit value and happily submits emails with overlong > lines, and this is where my problem occasionally arises, say when > emailing output from a cron job. > > I have various workarounds, and can imagine more. But the elegant > solution would be to make postfix's sendmail program honour and > enforce the smtp_line_length_limit parameter, or (better, and > backwards-compatible) to create another parameter dictating whether > sendmail would do this (e.g. sendmail_fix_line_length as > yes/no[default]). Obviously the limit should be applied after any > sendmail_fix_line_endings setting has been processed. Or an entirely > independent sendmail_line_length_limit parameter could be created (if > it is awkward to have sendmail honouring an smtp_ parameter). > > Is that possible or is it a bad idea? >