From bfe1d1fbad691c41928dead36a9db38848919ffa Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 2 Feb 2022 10:09:36 +0100 Subject: [PATCH] Drop first header requirement for qmail/Postfix --- FAQ.md | 4 ++-- app/src/main/java/eu/faircode/email/MessageHelper.java | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/FAQ.md b/FAQ.md index a125ff7f98..9460fef25d 100644 --- a/FAQ.md +++ b/FAQ.md @@ -4497,8 +4497,8 @@ To show shields, the option *Show authentication status indicator* in the displa A message will be consired safely transported if *every* [Received](https://datatracker.ietf.org/doc/html/rfc2821#section-4.4) header: * contains the phrase 'using TLS', 'via HTTP', 'version=TLS' -* contains the phrase '(qmail invoked by uid )' in the first added header -* contains the phrase '(Postfix, from userid nnn)' in the first added header +* contains the phrase '(qmail invoked by uid )' +* contains the phrase '(Postfix, from userid nnn)' * has a *by* with a local address * has a *by* xxx.google.com * has a *from* with a local address diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 00ad842111..57efd0f397 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -2185,9 +2185,8 @@ public class MessageHelper { // (qmail nnn invoked by uid nnn); 1 Jan 2022 00:00:00 -0000 // by (Postfix, from userid nnn) - if (first && - (header.matches(".*\\(qmail \\d+ invoked by uid \\d+\\).*") || - header.matches(".*\\(Postfix, from userid \\d+\\).*"))) { + if (header.matches(".*\\(qmail \\d+ invoked by uid \\d+\\).*") || + header.matches(".*\\(Postfix, from userid \\d+\\).*")) { Log.i("--- phrase"); return true; }