mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:41:13 +08:00
FIX: email receiver should ignore x-auto-response-suppress
This header is used by Microsoft Exchange to indicate when certain types of autoresponses should not be generated for an email. It triggers our "is this mail autogenerated?" detection, but should not be used for this purpose.
This commit is contained in:
@ -383,7 +383,7 @@ module Email
|
||||
@mail[:subject].to_s[
|
||||
/\A\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[
|
||||
@mail.header.reject { |h| h.name.downcase == "x-auto-response-suppress" }.to_s[
|
||||
/auto[\-_]?(response|submitted|replied|reply|generated|respond)|holidayreply|machinegenerated/i
|
||||
]
|
||||
end
|
||||
|
Reference in New Issue
Block a user