From 7917682e0825b32b68d494327d1e401b6e4c5018 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 24 Aug 2021 07:46:02 +0200 Subject: [PATCH] Evaluate precedence=bulk --- app/src/main/java/eu/faircode/email/MessageHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 4889b24293..906002ed6f 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1219,8 +1219,14 @@ public class MessageHelper { Boolean getAutoSubmitted() throws MessagingException { // https://tools.ietf.org/html/rfc3834 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 !"no".equalsIgnoreCase(header); }