プロジェクト

全般

プロフィール

Vote #80504

未完了

Report more precise error in failed requests (bounced emails) from incoming emails

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

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

0%

予定工数:
category_id:
29
version_id:
0
issue_org_id:
32519
author_id:
90398
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

When a user sends an invalid e-mail to rdm-mailhandler.rb, for instance with invalid project
id or missing mandatory fields, the bounced e-mail is not helpful, as it just says:

"Request was denied by your Redmine server. "
"Possible reasons: email is sent from an invalid email address or is missing some information."

And, from experience, users have hard times understanding what they got wrong.
I propose to report the actual error message so that it appears in the bounce e-mail.

Here is a quick patch that tries to avoid breaking the API of existing methods. It passes an
optional array to MailHandler.receive(), that is filled with error messages, so that
MailHandler.receive() can continue to return a boolean. Then it renders the message in the
body response of the 'unprocessable_entity' error if there is an error. rdm-mailhandler.rb
is also patched to get the response body and send it to stderr so that the MTA gets it.

There might be a cleaner way to implement this, but I tried to make it simple for now :)

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

いいね!0
いいね!0