diff options
Diffstat (limited to 'script')
-rwxr-xr-x | script/clear-caches | 2 | ||||
-rwxr-xr-x | script/handle-mail-replies | 9 | ||||
-rwxr-xr-x | script/update-xapian-index | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/script/clear-caches b/script/clear-caches index 2d91774ef..be1d3d017 100755 --- a/script/clear-caches +++ b/script/clear-caches @@ -4,7 +4,7 @@ LOC=`dirname $0` -"$LOC/runner" "ActiveRecord::Base.connection.execute(\"update incoming_messages set cached_attachment_text_clipped = null, cached_main_body_text_unfolded = null, cached_main_body_text_folded = null, sent_at = null, subject = null, safe_mail_from = null, mail_from_domain = null, valid_to_reply_to = null\")" +"$LOC/runner" "ActiveRecord::Base.connection.execute(\"update incoming_messages set cached_attachment_text_clipped = null, cached_main_body_text_unfolded = null, cached_main_body_text_folded = null, sent_at = null, subject = null, mail_from = null, mail_from_domain = null, valid_to_reply_to = null, last_parsed = null\")" # Remove page cache (do it in two stages so live site gets cache cleared faster) rm -fr $LOC/../old-cache diff --git a/script/handle-mail-replies b/script/handle-mail-replies index 9451bc9f2..68cab9035 100755 --- a/script/handle-mail-replies +++ b/script/handle-mail-replies @@ -120,12 +120,21 @@ def is_oof?(message) end end + if message.header_string("Auto-Submitted") == "auto-generated" + if subject =~ /out of( the)? office/ + return true + end + end + if subject.start_with? "out of office autoreply:" return true end if subject == "out of office" return true end + if subject == "out of office reply" + return true + end if subject.end_with? "is out of the office" return true end diff --git a/script/update-xapian-index b/script/update-xapian-index index 8d1fa7d0c..6ece02de0 100755 --- a/script/update-xapian-index +++ b/script/update-xapian-index @@ -1,5 +1,5 @@ #!/bin/bash cd `dirname $0` -rake --silent xapian:update_index +rake --silent xapian:update_index "$@" |