diff options
-rwxr-xr-x | email_in.pl | 8 |
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; |