1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Evaluate precedence=bulk

This commit is contained in:
M66B 2021-08-24 07:46:02 +02:00
parent 626822db1b
commit 7917682e08

View file

@ -1219,8 +1219,14 @@ public class MessageHelper {
Boolean getAutoSubmitted() throws MessagingException { Boolean getAutoSubmitted() throws MessagingException {
// https://tools.ietf.org/html/rfc3834 // https://tools.ietf.org/html/rfc3834
String header = imessage.getHeader("Auto-Submitted", null); String header = imessage.getHeader("Auto-Submitted", null);
if (header == null) if (header == null) {
// https://github.com/jpmckinney/multi_mail/wiki/Detecting-autoresponders
header = imessage.getHeader("Precedence", null);
if ("bulk".equalsIgnoreCase(header)) // Used by Amazon
return true;
return null; return null;
}
return !"no".equalsIgnoreCase(header); return !"no".equalsIgnoreCase(header);
} }