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:
parent
a299231f9a
commit
56089c4856
5 changed files with 21 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue