mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
incoming mail is considered autogenerated when the subject match a list of 'out of office' keywords
This commit is contained in:
parent
681f566a66
commit
ca4c939e9a
1 changed files with 2 additions and 1 deletions
|
@ -195,7 +195,8 @@ module Email
|
|||
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[:from].to_s[/(mailer[\-_]?daemon|post[\-_]?master|no[\-_]?reply)@/i] ||
|
||||
@mail[:subject].to_s[/^\s*(Auto:|Automatic reply|Autosvar|Automatisk svar|Automatisch antwoord|Abwesenheitsnotiz|Risposta Non al computer|Automatisch antwoord|Auto Response|Respuesta automática|Fuori sede|Out of Office|Frånvaro|Réponse automatique)/i] ||
|
||||
@mail.header.to_s[/auto[\-_]?(response|submitted|replied|reply|generated|respond)|holidayreply|machinegenerated/i]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue