Defect #21746

Truncate email not working

Added by Ben Blanco over 6 years ago. Updated over 6 years ago.

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


Category:Email receiving
Target version:-
Resolution: Affected version:3.2.0


I'm trying to get incoming emails truncated, to no avail.

my config:

redmine 3.2.0 stable
ruby 2.1.x
email IMAP fetching working fine via Rufus scheduler gem

In Admin/Settings/Incoming emails, I put ---cutoff---, which I then manually add to my test emails, but it gets imported & added to new Issues as well as all the lines below it, cf. screenshot:

My redmine instance is set to use Markdown, so just in case this was related, I tested w/ Textile activated - but emails still not being truncated at all.

Last - I've been sending test emails using Gmail, in case it has an impact.

redmine_truncate_incoming_email.png (9.89 KB) Ben Blanco, 2016-01-18 15:47


#1 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Needs feedback

#2 Updated by Ben Blanco over 6 years ago

Hi Toshi,

I've just looked at the mail_handler_test.rb but can't understand/see where the content of the test email for Line 960 is defined, ie. Content + Delimiter + Further content which should be truncated.

All I see is:

issue = submit_email('ticket_with_keyword_after_delimiter.eml'

Where is the content of ticket_with_keyword_after_delimiter.eml defined?

Also, do you have an idea of what I could do to troubleshoot further on my side?

#3 Updated by Ben Blanco over 6 years ago

Hi Toshi,

I found the test email ! :)

On Github when I had searched for ticket_with_keyword_after_delimiter the .eml file doesn't show up in the results :(

So, I ran the test on my machine locally, rake test test/unit/mail_handler_test.rb, and I agree it passes.

Then I amended ticket_with_keyword_after_delimiter.eml locally, adding Gmail headers and stuff from an email that fails to truncate on my production server; and the unit test passes.

But on my 3.2.0 production server, incoming emails are just not getting truncated.. at all.

I decided to remove the truncation directives I had specified on the server to only put one, and actually put the same one used in the unit test: == DELIMITER ==

Sent in several emails to the server - still no truncation.

Is there any logs I can look at? Or something else I can try?

My anticipated thanks to anyone who has suggestion(s) for me to troubleshoot this! ;)

#4 Updated by Ben Blanco over 6 years ago

Hi Toshi,

I know there's a lot of Issues open; so feel free to close this Issue, as I've found a workaround, cf.


#5 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from Needs feedback to Closed

Thank you for your feedback.

Also available in: Atom PDF