aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-09-08 09:04:46 +0100
committerRobin Houston <robin@lenny.robin>2011-09-08 09:04:46 +0100
commitdf5522a83e8f60832f68d874d3d92c1f429afaea (patch)
treec009a709de80a9e96224ad740d482a6228e7d6d7
parenta062176d2117d75f5bd9c07b4e2a4a63fbedf387 (diff)
Make OOF-detection subject matches case-insensitive
-rwxr-xr-xscript/handle-mail-replies10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/handle-mail-replies b/script/handle-mail-replies
index 125d84634..90a4d319a 100755
--- a/script/handle-mail-replies
+++ b/script/handle-mail-replies
@@ -100,20 +100,20 @@ end
def is_oof?(message)
# Check for out-of-office
- subject = message.header_string("Subject")
+ subject = message.header_string("Subject").downcase
if message.header_string("Return-Path") == "<>"
- if subject.start_with? "Out of Office: "
+ if subject.start_with? "out of office: "
return true
end
- if subject.start_with? "Automatic reply: "
+ if subject.start_with? "automatic reply: "
return true
end
end
- if subject.start_with? "Out of Office AutoReply:"
+ if subject.start_with? "out of office autoreply:"
return true
end
- if subject == "Out of Office"
+ if subject == "out of office"
return true
end
if subject.end_with? "is out of the office"