Only mark a message as read after we have validated the email reply

This commit is contained in:
Tom Hughes 2012-03-16 15:44:40 +00:00
parent 300639dfa3
commit 2ee961be9f

View file

@ -14,12 +14,12 @@ else
digest = message.digest
from = message.recipient
to = message.sender
message.update_attribute(:message_read, true)
end
exit 0 unless recipient[3] == digest[0,6]
message.update_attribute(:message_read, true) if message
mail = Mail.new(STDIN.readlines.join)
if mail.multipart?