Vote #75236
未完了mail messages being retrieved from davmail are incomplete
0%
説明
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------