Skip to content

Commit

Permalink
detect more auto-generated emails
Browse files Browse the repository at this point in the history
  • Loading branch information
ZogStriP committed Mar 30, 2016
1 parent bf57917 commit 6c82fbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/email/receiver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ def process_internal
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
Expand Down

0 comments on commit 6c82fbe

Please sign in to comment.