Defect #10721

Loss of attachments while fetching emails from IMAP (GMail)

Added by Sergey B over 8 years ago. Updated 4 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Email receiving
Target version:Candidate for next major release
Resolution: Affected version:1.3.2


When new issue is created by email fetched from gmail via redmine:email:receive_imap, attachments are ignored.

Steps to reproduce:

  1. send email with attachment to redmine GMail account.
  2. execute rake redmine:email:receive_imap RAILS_ENV=production
  3. go to issue list of the project

Expected: new issue was created with file attached to it. Mail in GMail box was cleared.

In fact: new issue is created but without attachments. Message is left in mailbox.

versions.txt Magnifier - Versions of software components (328 Bytes) Sergey B, 2012-04-20 06:37

redmine_attachments_save.diff Magnifier (520 Bytes) Steffen Zieger, 2013-04-18 11:58

10721-fixed.patch Magnifier (3.03 KB) Yuichi HARADA, 2020-05-26 04:20

Related issues

Related to Redmine - Patch #11499: Fixed attachments handling when receiving a new issue by ... New


#1 Updated by Максим Лазарев over 8 years ago

have the same problem, tell me, please, what's the problem?

#2 Updated by Gregory Engels about 8 years ago

see also related issue #11499 (with a patch)

#3 Updated by Steffen Zieger over 7 years ago

The following patch is working for me on Redmine 2.3.0

#4 Updated by Sebastian Paluch almost 5 years ago

This is still needed for 3.2.0.

This is very minor change. Can this be addressed soon?

#5 Updated by Moritz D over 4 years ago

I'm using 3.2.0

same problem as issue author
"new issue is created but without attachments. Message is marked read and left in mailbox"

applying redmine_attachments_save.diff did not help. should it resolve the problem? is noone else using email attachments?

any suggestions?
thank you in advance

#6 Updated by Prabhash Mishra about 4 years ago

I too am having the same problem on Redmine 3.2.3
IMAP and Gmail
Ticket gets created but attachment is ignored.
The patch does not work either.
Does anyone have a fix on this? Please help...

Thanks & Regards,

#7 Updated by Akhilesh Sabharwal about 4 years ago

Facing the same issue on Redmine 3.3.0.
Facing the same issue. All functions of retrieving mail working, except for attachments. On IMAP / POP3

Could this be a function of the IMAP server?

In which case will try an alternative.


#8 Updated by Alexandr Meshkov about 4 years ago

It works on Redmine 3.3.0, if you run the command via cron

#9 Updated by Janeks Kamerovskis about 3 years ago

I have the same problem with:

Redmine version 3.3.3.stable
Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux-gnu]
Rails version
Environment production
Database adapter Mysql2

Where could I look / dig to find the solution?


#10 Updated by Nicolas Silberzahn over 2 years ago

Please fix this! My Incomming emails from Evernote contains only inline images (hand writing)

#11 Updated by Yuichi HARADA 4 months ago

The problem could not be reproduced, but the possible causes are:
  1. The process to add the attachments is performed after issue#save!
  2. Attachments are added directly to issue#attachments, but originally it must go through #saved_attachments defined in acts_as_attachable.

I created a patch.

#12 Updated by Go MAEDA 4 months ago

  • Target version set to Candidate for next major release

Also available in: Atom PDF