プロジェクト

全般

プロフィール

QA #1083

未完了

Redmineの通知メールで他の宛先が表示されなくなった(Redmine4.0以降,仕様変更)

奈良 裕記 さんが約4年前に追加. 1年以上前に更新.

ステータス:
問合せ中
優先度:
通常
担当者:
カテゴリ:
-
対象バージョン:
-
開始日:
2020/02/25
期日:
2021/06/30 (2年以上 遅れ)
進捗率:

0%

予定工数:

説明

[お知らせ] 11/5午後、redmine.tokyo第23回勉強会開催(無料、受付中、品川+Zoom+YouTubeLive) https://redmine-tokyo.connpass.com/event/261924/

■現象/要望

Redmineの通知メールで他の宛先が表示されなくなった(Redmine4.0以降)
https://redmine.org/issues/26791

内容によっては、他の誰に通知されているか確認必要な場合もある。
Redmine3.4の時は、他の誰に送信されたか、通知メールのTo/Cc欄から判ったが、
4.0以降ではチケットを確認する必要がある。
個人設定で「すべて通知」にしている人への送信分は、チケット上から確認できない。

■解説動画

本件の解説動画をYoutubeに公開しました。併せてご覧ください。
https://www.youtube.com/watch?v=gelzsC5N70E&t=549s

■解決策

チケット起票/編集時の通知メール、個別送信/一括送信、どちらが適切かは、使用環境による。インターネット上の不特定多数環境なら、メールアドレス保護のために個別送信必要だし、社内利用ならメール返信でも伝えられる一括送信の方が求められる。
使用環境により切替できることが最善と考える。

■実力行使

OSSなのだから自力で修正すればよい。

Redmineの通知メールで従来のTo/Cc送信を可能にする。

https://github.com/y503unavailable/redmine/issues/46

下記コードで、チケット起票/編集時に、関係者・watcherに一括メール送信可能となった。管理/設定/メール通知で、一括メール送信を選択すれば切り替わる。
チケット以外は現在対応していない。To/Ccアドレスの処理など、雑な面が残っているので、6月中は継続作業する。

https://github.com/y503unavailable/redmine/tree/feature/%2346_singlemail

■対応状況

それなりに要望多かったので本家チケット作成しました。(門前払いでしたが)
賛成の方は、本家下記チケットに +1 のコメントお願いします。

Make other destinations visible in the Redmine notification email
https://redmine.org/issues/33479

■補足

3.Xでは、メール一括送信により他の送信先が判るという副作用があった。(4.0で仕様変更)
これを実質的な機能として利用している場合があったことが、認識されていなかったと思われる。
(メール通知先により対応必要なケースもある)

通知メール上のリンクからチケットを確認すれば判るが、件数が多ければ負担になる。

奈良 裕記 さんが約4年前に更新

奈良 裕記 さんが約4年前に更新

奈良 裕記 さんが約4年前に更新

  • 題名Redmineの通知メールで他の宛先が表示されなくなった(Redmine4.0以降) から Redmineの通知メールで他の宛先が表示されなくなった(Redmine4.0以降,仕様変更) に変更

奈良 裕記 さんが約4年前に更新

奈良 裕記 さんが約4年前に更新

TAKAOKA Yasuyuki さんが約4年前に更新

フックアップありがとうございます。うちの環境では、現時点で以下のようなクレームが挙がってます。
  • 他の誰に通知されているのかわからない
    • 送信先のうち、作成者/担当者/ウォッチャーはチケットを確認すればわかるが、個人設定で「すべて通知」にしている人については確認できない。
  • 担当者に個人、ウォッチャーにメーリングリストを指定している場合など、同じメールが複数届く。
  • 通知メールを元にしたやりとりができない
    • チケットに履歴を残したくない時や、裏でやりとりしたい場合有り

他の送信先がわからないメリットも承知しておりますので、設定によって選択できるようになればうれしいです。

奈良 裕記 さんが約4年前に更新

TAKAOKA Yasuyuki さん、コメントありがとうございます。

すべて通知設定、完全に見逃していました。
ご指摘の通り、メール通知のロジックで処理しないと判りませんね。

PJのすべて通知設定、情報管理面からは、制限できた方が良いかもしれません。
各社の情報SECPolicyによるでしょうが、
個人のメールに全部流して、後は追跡困難な状態にすることが好ましいとは思えません。

送信元メールアドレスをシステム用アドレス(サーバ管理者に転送)に設定していますが、
通知メールリプライによる巻き込みが時々あります。

全員返信の場合は無視、システムだけの場合は注意していますが、
4.1に上げたらどうなるかな。。

通知メールの差出人名が更新者名になったので、
メールアドレスに気付かず返信する人も出てきそうです。
(本家5913、設定で従来通りに回避可能)

これだけ多方面で使われると、想定外の影響が出る事は避けられません。
ユーザのフィードバックでスムーズに改善進めばと思っています。

奈良 裕記 さんが約4年前に更新

奈良 裕記 さんがほぼ4年前に更新

奈良 裕記 さんがほぼ4年前に更新

同趣旨のチケットは他にもあり、全てWontfixだった
文化差異を感じる。

Other recipients are not listed in To field even if Setting.bcc_recipients is false
https://redmine.org/issues/30787#note-4

If there is a significant request for retaining the information who got the notification
(which in turn would also carefully checked for information leaks),
the list of user could be added into the mail body now.
I personally don't see this as a necessary feature though
(and nobody else I'm aware of implements something something like that for their notifications).

https://redmine.org/issues/30787#note-9

The option was useful because users who got notifications can see who receives the notification (related to #6813).
Although we lost the feature in 4.0, I think we should accept it as a trade-off for #26791.

送信メールが増え過ぎて送信用のGmailのアカウントが送信不可になった。
Mail Notifications] (feature back) allow mails to be sent to multiple recipients at once
https://redmine.org/issues/32781

https://redmine.org/issues/32781#note-3

Indeed, this is the context for everyone who migrated to Redmine 4.*,
but the drawback is not such a huge problem comparing with the problems generated by the initial implementation.

This is your point of view, unfortunately, not mine.
We don't face any problems in 3.4 version (related to mail sending) now we have a huge problem (to use your expression).
Maybe this is a point you do not anticipate while working on #26791.

I find it unfortunate you did not let the choice to the administrator.

Too bad for me, I will look for another solution.

TAKAOKA Yasuyuki さんがほぼ4年前に更新

>奈良さん
本家登録ありがとうございました。
英語も通知メールの仕組みについてもスキル不足な私ですが、
すでに前田さんが同様の提起 をされていたものの、
何が問題なのか解らん、すでに時遅し、という感じで却下、というところでしょうか?

「I find it unfortunate you did not let the choice to the administrator.」に+1です。
ただ、「another solution」はあるかどうか・・・。

奈良 裕記 さんがほぼ4年前に更新

watcher多用している同僚を見ると、現状では4にアップデートし兼ねるのが現実。

関連動画を作成しました。
https://www.youtube.com/watch?v=gelzsC5N70E&t=549s

異文化で行動様式が異なることを痛切に感じます。頭の中にE.T.のテーマが流れてきました。(爆)

奈良 裕記 さんがほぼ4年前に更新

奈良 裕記 さんがほぼ4年前に更新

奈良 裕記 さんがほぼ4年前に更新

本家に反論上げました。
OSSですから、ちゃんと意見を出すことです。

https://www.redmine.org/issues/33479#note-3

Thank you for your comment.

>Thus, even before 4.0 you couldn't reliably find who got a notification based on the To / CC headers of the mail you received alone.

I understand that it was not a completely accurate contact, 
but The information had a sufficient level of reliability for simple confirmation.

In my judgment,that feature was lost in Redmine 4.0.

Perhaps the way to use the email notification function is different.

奈良 裕記 さんがほぼ4年前に更新

下記2点は別機能として考えた方が良さそう

1.メール通知先が判ること。
 メールのBodyに、送信先の名称のリストを追加することで対応できそう。
 個人設定で選択できれば良い。

2.チケット上でなくメール返信などで直接連絡できること

組織内でこの機能を利用するケースは多いが、これが適切かは、メールアドレスをプライバシー面でどこまで重要と捉えるかにも依存する。
利用形態(組織内利用、不特定多数利用)で、大幅に異なる。
 
人をwatcherに追加してチケット更新すればメールアドレスが一緒に流れてくるのは、
プライバシー面でどうかというのは理解できる。

システムとして選択(組織内利用、不特定多数間利用)でもしないと、両立困難だろう。

奈良 裕記 さんがほぼ4年前に更新

課題追加

メールのTo/Ccを利用してメールの振分けを行っている場合は、
担当者以外でも一律にToで配信されるため、確認するメール数が大幅に増える。
(従来のToは、チケットの担当者、作成者(担当者未設定時)だった筈)

対応手法
X-Redmine-Issue-Assignee が、自分の登録IDに一致するか確認する。
複数Redmineを併用している場合は、X-Redmine-Host、List-IdによるRedmineサーバを識別も必要。

奈良 裕記 さんが3年以上前に更新

https://redmine.org/issues/26791
各changesetの変更内容メモ

17583
https://redmine.org/projects/redmine/repository/revisions/17583

Send individual emails for each mail recipient

trunk/app/models/email_address.rb (diff)
 引数の user recipients,削除
 
trunk/app/models/mailer.rb (diff)
  class MultiMessage に変更
  to_users, cc_users の処理、引数削除
 
trunk/app/views/mailer/security_notification.html.erb (diff)
trunk/app/views/mailer/security_notification.text.erb (diff)
trunk/app/views/mailer/settings_updated.html.erb (diff)
trunk/app/views/mailer/settings_updated.text.erb (diff)

-------------------------
17584
https://redmine.org/projects/redmine/repository/revisions/17584

Cleanup: Remove Issue#each_notification and Journal#each_notification

app/models/issue.rb (diff)
app/models/journal.rb (diff)

削除のみ
def each_notification(users, &block)

-------------------------
17585
https://redmine.org/projects/redmine/repository/revisions/17585

Ensure that ActiveRecord::Base objects are fully serialized for mail sending (#26791).

app/models/mailer.rb (diff)

追加(17587で削除) class DeliveryJob < ActionMailer::DeliveryJob

DeliveryJob使用に変更

-------------------------
17587
https://redmine.org/projects/redmine/repository/revisions/17587

app/models/mailer.rb (diff)
config/environments/test.rb (diff)

削除 class DeliveryJob
呼出変更 DeliveryJob.set(options).perform_later(*args)
変更 test_email

-------------------------
17588
https://redmine.org/projects/redmine/repository/revisions/17588

Send emails asynchronously (#26791).

Custom async_* delivery methods are removed in favor of ActiveJob (Async by default).

各メール送信箇所を変更、引数変更有(user削除など)

app/controllers/account_controller.rb (diff)
app/controllers/admin_controller.rb (diff)
app/controllers/documents_controller.rb (diff)
app/controllers/files_controller.rb (diff)
app/controllers/my_controller.rb (diff)
app/controllers/users_controller.rb (diff)

app/models/comment.rb (diff)
app/models/document.rb (diff)
app/models/email_address.rb (diff)
app/models/issue.rb (diff)
app/models/journal.rb (diff)
app/models/mail_handler.rb (diff)
app/models/mailer.rb (diff)
app/models/message.rb (diff)
app/models/news.rb (diff)
app/models/setting.rb (diff)
app/models/user.rb (diff)
app/models/wiki_content.rb (diff)

views/mailer/_issue.html.erb (diff)
views/mailer/_issue.text.erb (diff)
views/mailer/account_activation_request.html.erb (diff)
views/mailer/account_activation_request.text.erb (diff)
views/mailer/issue_add.html.erb (diff)
views/mailer/issue_add.text.erb (diff)
views/mailer/issue_edit.html.erb (diff)
views/mailer/issue_edit.text.erb (diff)
views/mailer/security_notification.html.erb (diff)
views/mailer/security_notification.text.erb (diff)
views/mailer/settings_updated.html.erb (diff)
views/mailer/settings_updated.text.erb (diff)

config/initializers/10-patches.rb (diff)
削除 class AsyncSMTP < ::Mail::SMTP
削除 class AsyncSendmail < ::Mail::Sendmail
削除 ActionMailer::Base.add_delivery_method :async_smtp, DeliveryMethods::AsyncSMTP
削除 ActionMailer::Base.add_delivery_method :async_sendmail, DeliveryMethods::AsyncSendmail
削除 module ActionMailer
変更 class Tmpfile def deliver

lib/redmine/configuration.rb (diff)
delivery_method async エラー処理化

lib/redmine/info.rb (diff)
def environment 下記追加
["Mailer queue", ActionMailer::DeliveryJob.queue_adapter.class.name],
["Mailer delivery", ActionMailer::Base.delivery_method]

tasks/email.rake (diff)

-------------------------
17590
https://redmine.org/projects/redmine/repository/revisions/17590

Replaces remaining #deliver with #deliver_later (#26791).

app/models/mailer.rb (diff)
変更 deliver_later→deliver

-------------------------
17591
https://redmine.org/projects/redmine/repository/revisions/17591

Removes method_missing override (#26791).

app/models/mailer.rb (diff)

削除 def self.method_missing(method, *args, &block)

-------------------------
17668
https://redmine.org/projects/redmine/repository/revisions/17668

Use "abort" instead of "exit" in order to make error log more informative (# 26791).

lib/redmine/configuration.rb (diff)
def setup 追加


奈良 裕記 さんがほぼ3年前に更新

奈良 裕記 さんがほぼ3年前に更新

奈良 裕記 さんがほぼ3年前に更新

下記設定を実施する必要がある

必要な設定

■個人単位

メール通知
 チェック外す
 ・自分自身による変更の通知は不要

設定
 チェック外す
 ・メールアドレスを隠す

■設定/メール通知

チェック外す
・宛先を非表示(BCC)

・単一メールによる通知(新規追加)

奈良 裕記 さんがほぼ3年前に更新

個人単位のメール通知設定により、メール送信されない現象が発生。
(mail 呼び出し、To 設定アドレスは問題無い事を確認済)

PJ内通知→送信される、担当者単位(関連・担当)→送信されない

mail 送信直前に、ActionMailer::Base.perform_deliveries =true を設定すると、担当者単位の設定でも通知された。

perform_deliveries 設定前にlog出力するとtrueだった。
ここで明示的にtrue設定すると送信された。

奈良 裕記 さんがほぼ3年前に更新

格闘中状況(2021/5/19現在)
・以下、メール送信直前に Base.perform_deliveries =true 実行した上での状況
・複数人宛同報メール送信は動作しているが、ときどきメール送信自体が止まる。
・このとき、mailメソッド自体は呼んでいる。(デバッグログ確認済)
・ユーザ設定の中から「アカウント情報をユーザーに送信」を実行すると、メール送信が復活する。

参照先
https://github.com/y503unavailable/redmine/issues/46
https://github.com/y503unavailable/redmine/tree/feature/%2346_singlemail

奈良 裕記 さんがほぼ3年前に更新

  • 説明 を更新 (差分)
  • 期日2021/06/30 にセット
  • ステータス新規 から 問合せ中 に変更

奈良 裕記 さんがほぼ3年前に更新

ターゲットの動作環境(試行中)にて、チケットの起票/編集時に、関係者にTo/Ccでメール送信できた。

奈良 裕記 さんが2年以上前に更新

奈良 裕記 さんが約2年前に更新

奈良 裕記 さんが1年以上前に更新

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