Project

General

Profile

Fetching email from an IMAP server

Added by Mr Embedded about 15 years ago

Hi All,

I am running into a bit of an issue. Followed the fetching email thing in the wiki and its working great. All of my users can reply to emails and their tickets get updated, all except one. This user replies from a mobile device that always puts 'Sent from my mobile device' at the top of the message before the '-----Original Message-----' part. I think this could be preventing redmine from parsing the message properly as all of those messages stay stuck in the mailbox and the tickets are not updated.

Can someone give any input on this issue?


Replies (4)

RE: Fetching email from an IMAP server - Added by Brad Rushworth almost 15 years ago

You are going to have to provide more detail than that!

Try attaching the email source, complete with headers.

Also, which Redmine version are you using? The Redmine log file would also be useful.

And your posting title is quite vague and doesn't represent your problem.

I look forward to getting the details from you...

RE: Fetching email from an IMAP server - Some messages dont make it - Added by Mr Embedded almost 15 years ago

Thanks for the reply.

Ok here is an example header:

Return-Path: <SRS0=Mdvbw4=HH=XXXXXX.XXXXXXXXX.net=XXXXXXXX@XXX.XXX.XX.XXXXXXXXXX.com>
X-Original-To: redmine@XXXXXXXXXXXXXXXXXXXX.com
Delivered-To: redmine@XXXXXXXXXXXXXXXXXXXX.com
Received: from XXXXXX.XXX.XX.XXXXXXXXXX.com (XXXXXX.XXX.XX.XX.com [XXX.X.XXX.XX])
     by XXXXXX.XXXXXXXX.ca (Postfix) with ESMTP id 077A66BDB7
     for <redmine@XXXXXXXXXXXXXXXXXXXX.com>; Thu, 19 Nov 2009 08:02:05 -0500 (EST)
Received: from XXXXXX.XXXX.XXXX.XX.XXXXXXXXXX (XXXXXX.XXXX.XXXX.XX.XXXXXXXXXX [XXX.XX.XXX.XX])
     by XXX.XXX.XX.XXXXXXXXXX.com (8.13.7 TEAMON/8.13.7) with ESMTP id nAJBlUbs010025
     for redmine@XXXXXXXXXXXXXXXXXXXX.com; Thu, 19 Nov 2009 13:02:01 GMT
X-rim-org-msg-ref-id: 1018743245
Message-ID: <1018743245-1258635724-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX.net-1682934650-@XXXXXX.XXXX.XXXX.XX.XXXXXXXXXX>
Reply-To: XXXXXXXX@XXXXXX.XXXXXXXXXX.net
X-Priority: Normal
References: <4b054191dc061_4917..fdbe828de175@Redmine.tmail>
In-Reply-To: <4b054191dc061_4917..fdbe828de175@Redmine.tmail>
Sensitivity: Normal
Importance: Normal
To: redmine@XXXXXXXXXXXXXXXXXXXX.com
Subject: Re: [XXXXX - Tasks #669] XXX XXXXXXX - XXXXXXXXXX
From: XXXXXXXX@XXXXXX.XXXXXXXXXX.net
Date: Thu, 19 Nov 2009 12:59:29 +0000
Content-Type: multipart/alternative; boundary="part20397-boundary-1533916700-447539061" 
MIME-Version: 1.0

And here is the body:

XXX
Sent from my XXXXXXXXXX device on the XXXXXXX XXXXXXXX Network

-----Original Message-----
From: redmine@XXXXXXXXXXXXXXXXXXXX.com
Date: Thu, 19 Nov 2009 08:01:05 
To: undisclosed-recipients:;<Invalid address>
Subject: [XXXXXX - Tasks #669] XXX XXXXXXX - XXXXXXXXXX

Issue #669 has been updated by XXXXXXX

Assigned to changed from XXXXXX to XXXXX

XXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
----------------------------------------
Tasks #669: XXX XXXXXXX - XXXXXXXXXX
https://redmine.XXXXXXXXXXXXXXXXXXXX.com/issues/show/669

Author: XXXXXX
Status: New
Priority: Normal
Assigned to: XXXXX
Category: 
Target version: 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX

-- 
You have received this notification because you have either subscribed to it, or are
involved in it.
To change your notification preferences, please click here:
https://redmine.XXXXXXXXXXXXXXXXXXXX.com/my/account

The above is one of the mails that stay marked as read (not deleted) on the IMAP server but the tickets never update.

I am having another issue were the reply will make it into the system and the ticket is updated but the update shows an email style sheet like:

body {
font-family: Verdana, sans-serif;
font-size: 0.8em;
color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
hr {
width: 100%;
height: 1px;
background: #ccc;
border: 0;
}
.footer {
font-size: 0.8em;
font-style: italic;
}

That one was replied to from a device running android.

I am using Redmine 0.8.5.stable.2915 (MySQL) running on Debian Lenny. I'll try to parse the log and post any relavent bits.

One more thing. The emails that get left on the server are coming from a user that has had their email address changed in the administration page, to this address.

RE: Fetching email from an IMAP server - Added by Brad Rushworth almost 15 years ago

The above is one of the mails that stay marked as read (not deleted) on the IMAP server but the tickets never update.

This is the behaviour when either the email address isn't recognised, or the user doesn't have permissions in the project to create / modify issues. Take a look at #2230 for recent changes being developed in this area.

Check in Redmine the email address is correct, that it doesn't have any trailing spaces etc, and that it is unique. Check that the user is able to create / modify issues on the particular project from the web interface.

Have a look at the code for more info (the variable names correspond the the needed project permissions for the user):

:add_issues
source:branches/0.8-stable/app/models/mail_handler.rb@2881#L85

:add_issue_notes or :edit_issues
source:branches/0.8-stable/app/models/mail_handler.rb@2881#L126

In regards to the second issue, try looking at:

source:branches/0.8-stable/app/models/mail_handler.rb@2881#L182

A simple solution is to set that client to text only emails. The client might be generating invalid / mangled email headers or HTML code. Impossible to tell without looking at the email source including headers. I'm not particularly an expect in the field either, but I might be able to help you out.

RE: Fetching email from an IMAP server - Added by Mr Embedded almost 15 years ago

Right you were about enabling the permissions so the user could modify issues. I was trying to setup the user as more of an 'administrative' type user that can look but not touch too much. They could initiate and reply to issues on the portal, but not via email and the modify issues permission wasn't enabled for them and that was the reason why. Its working great now.

I haven't tried the other bit using text only emails but that seemed to be a one off issue from the android devce.

Thanks for the help.

    (1-4/4)