detect more auto-generated emails

This commit is contained in:
Régis Hanol 2016-03-30 18:41:09 +02:00
parent bf579174c1
commit 6c82fbebf5
1 changed files with 3 additions and 2 deletions

View File

@ -118,8 +118,9 @@ module Email
end
def is_auto_generated?
@mail[:precedence].to_s[/list|junk|bulk|auto_reply/] ||
@mail.header.to_s[/auto-(submitted|replied|generated)/]
@mail[:precedence].to_s[/list|junk|bulk|auto_reply/i] ||
@mail[:from].to_s[/(mailer-?daemon|postmaster|noreply)@/i] ||
@mail.header.to_s[/auto[\-_]?(response|submitted|replied|reply|generated|respond)|holidayreply|machinegenerated/i]
end
def select_body