From: Frédéric Buclin Date: Mon, 18 Jul 2011 00:24:08 +0000 (+0200) Subject: Bug 662883: email_in.pl should ignore "out of the office" auto-reply emails X-Git-Tag: bugzilla-4.1.3~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=541c3e88d19110b848c5a5d3c074874e6feed5d6;p=thirdparty%2Fbugzilla.git Bug 662883: email_in.pl should ignore "out of the office" auto-reply emails r/a=mkanat --- diff --git a/email_in.pl b/email_in.pl index 393061cd55..55e7b119af 100755 --- a/email_in.pl +++ b/email_in.pl @@ -86,6 +86,14 @@ sub parse_mail { $summary = trim($2); } + # Ignore automatic replies. + # XXX - Improve the way to detect such subjects in different languages. + my $auto_submitted = $input_email->header('Auto-Submitted') || ''; + if ($summary =~ /out of( the)? office/i || $auto_submitted eq 'auto-replied') { + debug_print("Automatic reply detected: $summary"); + exit; + } + my ($body, $attachments) = get_body_and_attachments($input_email); if (@$attachments) { $fields{'attachments'} = $attachments;