プロジェクト

全般

プロフィール

Vote #75502

完了

Parse author's name enclosed in parentheses in the From field when creating a user account from an email

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
29
version_id:
127
issue_org_id:
17699
author_id:
1381
assigned_to_id:
332
comments:
14
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Emails header "From" can be not only in angles format, like this:

From: John Doe john.doe@company.mail
but also in parentheses format, like this:
From: john.doe@company.mail (John Doe)
For example sendmail from postfix does this when using switch -F.
The patch to fix this is attached.


journals

Please add test.
source:trunk/test/unit/mail_handler_test.rb
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I wrote a new patch. The code using @Mail::Address@ is shorter and maybe more reliable (I hope) than the code using our regular expressions.

Patches to commit:
* attachment:17699-fix-using-mail-address-object.diff
* attachment:email_from_parens_format_test.diff
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Updated the patch. @email.header['from']@ can be nil or @Mail::UnstructuredField@ object (does not have @addrs@ method).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Updated the patch again. @from_addr.comments@ also can be nil.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリEmail receiving_29 にセット
  • 対象バージョン4.1.0_127 にセット

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

いいね!0
いいね!0