diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-06 13:24:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-06 13:24:30 +0000 |
commit | dd1163b58a30285f5252fa18c41e935e154ab10e (patch) | |
tree | 8d77492521725e6c860d0a0c755f7ba3823a833a /app | |
parent | 051794dffced6c68a10d113833b9c14eb936791d (diff) | |
download | redmine-dd1163b58a30285f5252fa18c41e935e154ab10e.tar.gz redmine-dd1163b58a30285f5252fa18c41e935e154ab10e.zip |
Makes the mail handler ignore out-of-office emails (#10607).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9358 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mail_handler.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 2d50a8057..e0c12f1a0 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -54,6 +54,13 @@ class MailHandler < ActionMailer::Base end return false end + # Ignore out-of-office emails + if email.header_string("X-Auto-Response-Suppress") == 'OOF' + if logger && logger.info + logger.info "MailHandler: ignoring out-of-office email" + end + return false + end @user = User.find_by_mail(sender_email) if sender_email.present? if @user && !@user.active? if logger && logger.info |