プロジェクト

全般

プロフィール

Vote #81291

未完了

Unnecessary encoded CR characters in mails

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Resolved
優先度:
通常
担当者:
-
カテゴリ:
Email notifications_9
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
9
version_id:
0
issue_org_id:
34831
author_id:
342253
assigned_to_id:
0
comments:
2
status_id:
3
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
159
ステータス-->[Resolved]

説明

I noticed that Redmine adds unnecessary CR (0x0d) characters to mail texts which may confuse some MUA's, e.g. (note the qp encoded “@=0D@”, not to be confused with the regular CRLF line endings required by RFC 5322, indicated by “@\r@”):

----==_mimepart_603f956964fe8_7c03fdcbf1d3464612fe\r
Content-Type: text/plain;\r
 charset=UTF-8\r
Content-Transfer-Encoding: quoted-printable\r
\r
Ticket #3814 wurde erstellt von Albrecht Dre=C3=9F.=0D\r
=0D\r
----------------------------------------=0D\r
Feature #3814: Diskussion=0D\r
https://web.my.org/redmine/issues/3814=0D\r
=0D\r
* Autor: Albrecht Dre=C3=9F=0D\r

Is it possible to get rid of them? Where should I look in the sources? I run Redmine 4.0.7 on a Debian Buster system, installed from Debian Backports.


journals

sources are here https://github.com/mikel/mail it's a dependency of Redmine.

The result looks buggy to me, but there was no release in 3 years, so I wouldn't expect much even if you have a fix.
--------------------------------------------------------------------------------
Sorry for the late reply – I meanwhile found time to dig into this issue, and it appears that it's actually related to "mail issue 1325":https://github.com/mikel/mail/issues/1325. The issue seems to occur _only_ if the message body contains non-ASCII characters (e.g. German “Umlaut” chars like ä). The @ruby-mail@ version (on Debian Buster) is "2.7.1":https://packages.debian.org/buster/ruby-mail.

Simply creating the file @/usr/share/redmine/config/initializers/99_fix_mail_crlf.rb@ containing
<pre><code class="ruby">module Mail
module Encodings
class QuotedPrintable < SevenBit
def self.encode(str)
::Mail::Utilities.to_crlf([::Mail::Utilities.to_lf(str)].pack("M"))
end
end
end
end</code></pre>
and restarting Apache results in properly formatted messages for me (afaict).
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリEmail notifications_9 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0