diff options
author | francis <francis> | 2009-04-27 02:07:42 +0000 |
---|---|---|
committer | francis <francis> | 2009-04-27 02:07:42 +0000 |
commit | bb4044ed9f56e3d52f96afca5642419361942dc1 (patch) | |
tree | 802479d588f634d859f44d0b1d9904c3c0801612 /app/models/incoming_message.rb | |
parent | d93270d9307a4798f93f0d8acddf08bcf4ab11b6 (diff) |
Don't allow reply to Auto_Reply emails
Diffstat (limited to 'app/models/incoming_message.rb')
-rw-r--r-- | app/models/incoming_message.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index f0072899a..1813949de 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.200 2009-04-21 10:18:22 francis Exp $ +# $Id: incoming_message.rb,v 1.201 2009-04-27 02:07:42 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel @@ -1129,14 +1129,11 @@ class IncomingMessage < ActiveRecord::Base # reject postmaster - authorities seem to nearly always not respond to # email to postmaster, and it tends to only happen after delivery failure. + # likewise Mailer-Daemon, Auto_Reply... prefix = email prefix =~ /^(.*)@/ prefix = $1 - if !prefix.nil? && prefix == 'postmaster' - return false - end - # likewise Mailer-Daemon - if !prefix.nil? && prefix == 'Mailer-Daemon' + if !prefix.nil? && ['postmaster', 'mailer-daemon', 'auto_reply'].include?(prefix.downcase) return false end |