summaryrefslogtreecommitdiffstats
path: root/email_in.pl
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-07-18 02:24:08 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-07-18 02:24:08 +0200
commit541c3e88d19110b848c5a5d3c074874e6feed5d6 (patch)
tree744f712152f43d49e3a6b85131e881e357f0fd70 /email_in.pl
parent8356bb7edf60f6956d825a2aef79dad6e087321b (diff)
downloadbugzilla-541c3e88d19110b848c5a5d3c074874e6feed5d6.tar.gz
bugzilla-541c3e88d19110b848c5a5d3c074874e6feed5d6.tar.xz
Bug 662883: email_in.pl should ignore "out of the office" auto-reply emails
r/a=mkanat
Diffstat (limited to 'email_in.pl')
-rwxr-xr-xemail_in.pl8
1 files changed, 8 insertions, 0 deletions
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;