Defect #8758

Ignore email keywords after delimiter

Added by Grant McEwan about 7 years ago. Updated almost 4 years ago.

Status:ClosedStart date:2011-07-07
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Email receiving
Target version:2.6.0
Resolution:Fixed Affected version:

Description

HI,

I have found that redmine parses the entire email for variables, and doesn't stop at the specified point.
Eg, an reply formatted email

Status: Closed
--- Please reply ABOVE THIS LINE to respond to this issue ---
Issue #1508 has been reported by Grant McEwan.

----------------------------------------
Bug #1508: test ticket
https://path to/redmine/issues/1508

Author: Grant McEwan
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 

Testing a ticket to see where it ends up,

The 2nd Status seems to trump the 1st?

Does this seem to be the case? It should strip anything from the the cut line and ignore it.

0001-Fixed-setting-issue-attributes-by-mail-use-only-the-.patch Magnifier (850 Bytes) Alex Shulgin, 2011-07-07 07:50


Related issues

Related to Redmine - Feature #2852: Clean Incoming Email of quoted text "----- Reply above th... Closed 2009-02-27

Associated revisions

Revision 13413
Added by Jean-Philippe Lang almost 4 years ago

Ignore email keywords after truncation line (#8758).

History

#1 Updated by Alex Shulgin about 7 years ago

Confirmed with git:1.2-stable.

Attached is a fix to this problem. The fix makes it search for the first match of /^attr: value$/ and ignore the rest of the mail body.

#2 Updated by Etienne Massip about 7 years ago

  • Category set to Email receiving

#3 Updated by Etienne Massip about 7 years ago

  • Target version set to Candidate for next minor release

#4 Updated by Drew Keller almost 7 years ago

I noticed this same problem. I used Alex's fix to get it working properly. Redmine 1.2.1

#5 Updated by Etienne Massip almost 7 years ago

The fix should be to use cleaned_up_text_body instead of plain_text_body in call to #extract_keyword! (source:/trunk/app/models/mail_handler.rb#L229 as of r6325), isn't it?

#6 Updated by Alex Shulgin almost 7 years ago

Etienne Massip wrote:

The fix should be to use cleaned_up_text_body instead of plain_text_body in call to #extract_keyword! (source:/trunk/app/models/mail_handler.rb#L229 as of r6325), isn't it?

Yeah, but Setting.mail_handler_body_delimiters is blank by default, so this isn't really going to work.

#7 Updated by Etienne Massip almost 7 years ago

Right, both fixes should be committed.

BTW, adding a line "--- Please reply ABOVE THIS LINE to respond to this issue ---" requires a bit of tweaking, already?

Maybe that the first delimiter /^>\s*--.*$/ could be considered by default as a reply separator?

#8 Updated by Alex Shulgin almost 7 years ago

Etienne Massip wrote:

Right, both fixes should be committed.

BTW, adding a line "--- Please reply ABOVE THIS LINE to respond to this issue ---" requires a bit of tweaking, already?

Well, yes, and adding that line as a email-truncation pattern makes sense, once you add it to the email header.

Maybe that the first delimiter /^>\s*--.*$/ could be considered by default as a reply separator?

I wouldn't vote for that. Imagine someone forwarding some mail or adding redmine address in reply, so that the quoted text isn't coming from the ticket history. If we were to cut the mail at the above pattern, we might be missing valuable information intended to be included in the ticket history.

#9 Updated by Jean-Philippe Lang about 4 years ago

  • Target version changed from Candidate for next minor release to 2.6.0

#10 Updated by Jean-Philippe Lang almost 4 years ago

  • Subject changed from Parsing of variables for incoming emails to Ignore email keywords after delimiter
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r13413.

Also available in: Atom PDF