diff options
author | francis <francis> | 2009-04-27 02:25:31 +0000 |
---|---|---|
committer | francis <francis> | 2009-04-27 02:25:31 +0000 |
commit | 6cb3d1c969fb86d7d3be31ae94a0acc3baf834e5 (patch) | |
tree | 555d3b53630106817fa4a52e85a88c35d7ad6811 | |
parent | 3e2600b5564cd3e1870d79ea008fec4b5b5bb066 (diff) |
Use regexps
-rw-r--r-- | app/models/incoming_message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 1813949de..8903b8c01 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -19,7 +19,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.201 2009-04-27 02:07:42 francis Exp $ +# $Id: incoming_message.rb,v 1.202 2009-04-27 02:25:31 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel @@ -1133,7 +1133,7 @@ class IncomingMessage < ActiveRecord::Base prefix = email prefix =~ /^(.*)@/ prefix = $1 - if !prefix.nil? && ['postmaster', 'mailer-daemon', 'auto_reply'].include?(prefix.downcase) + if !prefix.nil? && prefix.downcase.match(/^(postmaster|mailer-daemon|auto_reply)$/) return false end |