プロジェクト

全般

プロフィール

Vote #80878

未完了

Notification Emails cut off due to SMTP protocol specificies

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

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

0%

予定工数:
category_id:
9
version_id:
0
issue_org_id:
33450
author_id:
133427
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
154
ステータス-->[New]

説明

Today I want to share a story of a bug that I dealt with for quite a while now - I guess I first noticed it about a year ago.

We are using Redmine as a project management tool at my company for almost ten years now. About a year ago (maybe it was more, I don't remember), I noticed that some notification emails about issue updates were simply too short: Instead of showing the issue's data fields and the note as usual, I would only get a single line in my inbox:

Issue #22222 has been updated by Nicolas Xxxxxx

First I thought it's just something about the notification / email configuration, and half-heartedly looked at the configuration, but didn't find out anything. It was only happening for some updates, not all of them, so I just lived with the issue. However it was still a bother.

So, a few days ago I started looking into it again. I noticed that in the received emails, the HTML part was cut off very suddenly in the source:

(...)
=
(...)
Issue #22222 has been updated by Nicolas Xxxxxx=

What a sudden stop! And no errors in the logs either!

What was intersting to me was that the last line was exactly the maximum length. So, following my intuition, I looked at all the notification emails I got in the past where the cutoff happened. Interestingly, they were all triggered by people with the same name length!

Following up, I called up one colleague whose name matched the "problematic" length. I renamed his account to a longer first name and had him update a test ticket for me. And what do I see? The notification works! Here's how that email looks in the source now:

(...)
Issue #22222 has been updated by Nicolass Xxxxx=
x.

(...)

So - The last name is broken onto the next line, and suddenly the email works???

Luckily, after pondering this for a while, I remembered me messing with mail servers via Telnet back in the day. Wasn't there something about message syntax? How did we end an email after typing in a message? Right - a period alone on a line!

Now it seems that when the issue ID, change ID, URL and Account name line up juuuust right, the rendered email template will put such a period on a line on it's own! And that way, the mail server would accept the first half of the message, send it out, and disregard the rest.

Now, back to Redmine: I don't know if the bug is in Redmine itself, or in the email library used that was supposed to escape such characters, so I'm depositing it here.

I hope you guys get a good grin out of reading this just as I did when I finally discovered the cause of that issue! I'll be glad to help out with more info if needed.

Environment:
  Redmine version                3.4.12.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux-gnu]
  Rails version                  4.2.11.1
  Environment                    production
  Database adapter               PostgreSQL

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

  • カテゴリEmail notifications_9 にセット

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

いいね!0
いいね!0