プロジェクト

全般

プロフィール

Vote #75236

未完了

mail messages being retrieved from davmail are incomplete

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

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

0%

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

説明

Our setup:

redmine 2.5.0 -> davmail 4.4.1-2225 -> exchange 2010

We process mail messages via rake like so:

rake -f /usr/local/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=xxx port=xxx username=xxx password=xxx project=pickle unknown_user=accept allow_override=project no_permission_check=1

Example of a test e-mail msg:

Subject: test email bug 1

Test message 1 body

Project: project1
Tracker: Bug
Priority: Urgent

After the rake is run, issues are created, however none of the fields are populated.

Looking at mail_handler.rb, we should have the complete email object @ line 74:

def receive(email)
@email = email

Dumping @email.inspect to logger, I see the following quite incomplete msg:

#, >, , , >

Thinking that maybe this is connected to our local mail encoding, I tried sending plain text mail from gmail, but saw the same results.

My next thought was that something is off on the davmail -> exchange side, but retrieving the mail body via imap seems to work fine. (imap retrieval log attached).

Is it possible that there's a Redmine bug causing incomplete email msg retrieval?


journals

--------------------------------------------------------------------------------
I had a chance to dig a little deeper.

It seems that Net::IMAP's fetch() breaks when retrieving a uid with attr RFC822 from davmail. Changing line 33 of lib/redmine/imap.rb from

msg = imap.uid_fetch(uid,'RFC822')[0].attr['RFC822']

to

msg = imap.uid_fetch(uid,'BODY[]')[0].attr['BODY[]']

resolves the issue for me.

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

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

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

  • カテゴリEmail receiving_29 にセット

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

いいね!0
いいね!0