2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FEATURE: new 'auto_generated_whitelist' site setting

This commit is contained in:
Régis Hanol 2016-04-11 22:47:34 +02:00
parent a299231f9a
commit 56089c4856
5 changed files with 21 additions and 0 deletions

View file

@ -118,6 +118,7 @@ module Email
end
def is_auto_generated?
return false if SiteSetting.auto_generated_whitelist.split('|').include?(@from_email)
@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]