Patch #16190

Relax rejections based on Auto-Submitted header

Added by Felix Schäfer over 4 years ago. Updated over 3 years ago.

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

0%

Category:Email receiving
Target version:2.6.0

Description

One of our (Plan.io) uses an email server to forward messages to a Redmine instance which inserts Auto-Submitted: auto-forwarded headers to the forwarded emails. Those emails are then rejected because of source:/trunk/app/models/mail_handler.rb@12937#L69.

Putting the fact aside that this header is only part of an IETF draft and not of an RFC, and that even according to that draft it shouldn't be there, this header causes the forwarded emails to be reject. We propose changing the Regex to only match the undesirable values defined in RFC3834, i.e. /^auto-(replied|generated)/.

16190.patch Magnifier (678 Bytes) Felix Schäfer, 2014-02-27 12:57


Related issues

Related to Redmine - Feature #11338: Exclude emails with auto-submitted => auto-generated Closed
Related to Redmine - Defect #15999: Ignoring out of office emails Closed
Related to Redmine - Defect #20465: MailHandler: ignoring email with Auto-Submitted:auto-gene... Needs feedback

Associated revisions

Revision 13205
Added by Toshi MARUYAMA about 4 years ago

add "Auto-Submitted: auto-forwarded" to ignore mail test (#16190)

Revision 13206
Added by Toshi MARUYAMA about 4 years ago

only ignore undesirable Auto-Submitted headers defined in RFC3834 (#16190)

Contributed by Felix Schäfer.

Revision 13207
Added by Toshi MARUYAMA about 4 years ago

use \A instead of ^ for RegExp (#16190)

History

#1 Updated by Felix Schäfer over 4 years ago

And here is the patch.

#2 Updated by Holger Just over 4 years ago

To cite from RFC 3834

Recipients of messages containing an Auto-Submitted field with any keyword other than "no" MAY assume that the message was not manually submitted by a human.

Thus, although it may be correct to swallow this email, it makes it much harder for people using kind-of-broken mail servers (like Lotus Domino) which forcefully include the Auto-Submitted: auto-forwarded header into all outgoing mails touched by their forwarding script.

In addition, given that forwarded mails generally are assumed to be valid, we could thus argue that the auto-forwarded mails are not to be dropped.

#3 Updated by Markus Plutka about 4 years ago

+1

#4 Updated by Jan Niggemann (redmine.org team member) about 4 years ago

Patch verified (and it's trivial anyway), can someone please merge this?

IMHO it's important that we merge such trivial patches right away and not let the contributor wait too long...

#5 Updated by Miquel Coll about 4 years ago

Jan Niggemann (redmine.org team member) wrote:

Patch verified (and it's trivial anyway), can someone please merge this?

IMHO it's important that we merge such trivial patches right away and not let the contributor wait too long...

I tried the patch in redmine-2.4.5 and worked fine. i'm using Lotus Domino and now the messages are not rejected.

#6 Updated by Toshi MARUYAMA about 4 years ago

  • Target version set to 2.6.0

#7 Updated by Toshi MARUYAMA about 4 years ago

  • Related to Feature #11338: Exclude emails with auto-submitted => auto-generated added

#8 Updated by Toshi MARUYAMA about 4 years ago

#9 Updated by Toshi MARUYAMA about 4 years ago

  • Status changed from New to Closed

Committed in trunk r13205, r13206 and r13207, thanks.

#10 Updated by Toshi MARUYAMA over 2 years ago

  • Related to Defect #20465: MailHandler: ignoring email with Auto-Submitted:auto-generated header added

Also available in: Atom PDF