From 541c3e88d19110b848c5a5d3c074874e6feed5d6 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 18 Jul 2011 02:24:08 +0200 Subject: Bug 662883: email_in.pl should ignore "out of the office" auto-reply emails r/a=mkanat --- email_in.pl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'email_in.pl') diff --git a/email_in.pl b/email_in.pl index 393061cd5..55e7b119a 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; -- cgit v1.2.3-24-g4f1b