I found tools/hook-scripts/mailer/mailer.py can produce very long
subject header line without folding. It can be easily over 1000
characters  if some large source tree is imported in a repository
and truncate_subject config value is not specified appropriately.
The mailer.py script send it without regard if server can accept over
1000 octets line , and don't have way of recovery when received
response like "500 line too long" (of course, as this response code
doesn't show the reason, it is no wonder).
I also found similar suggestion for commit-email.pl in users@ list
archive , but on mailer.py we can avoid it by setting apropriate
truncate_value, such as 200 (, which is shown as comment in
mailer.conf.example). Is it succifient?
(1) It is suffient because this is a code example and setting example,
and not to use as is.
(2) We should change the default value not to violate them.
(3) We should change the default value and ignore if larger values is
(4) We should implement line folding
By the way, it seems another issue about truncate_subject that current
implementation of truncate_subject may break utf-8 multi-bytes character
sequence, but I didn't reproduce it(because I always use ascii
characters only for file names...).
 RFC 5322 Internet Message Format
2.1.1 Line Length Limits
 RFC 5321 Simple Maile Transfer Protocol
220.127.116.11 SizeLimits and Minimums - 18.104.22.168.6 Text Line
 usrs@ thread "commit-email.pl violates rfc2822"
Yasuhito FUTATSUKI <futatuki_at_poem.co.jp>
Received on 2020-01-06 22:54:37 CET