1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-22 06:01:12 +00:00

Added rule condition $$automatic

This commit is contained in:
M66B 2022-03-28 08:04:35 +02:00
parent b544b4e457
commit 82d523db04
3 changed files with 5 additions and 0 deletions

1
FAQ.md
View file

@ -2510,6 +2510,7 @@ $$blocklist$
$$replydomain$
$$nofrom$ (since version 1.1791)
$$multifrom$ (since version 1.1791)
$$automatic (since version 1.1862)
```
Note that *regex* should be disable and that there should be no white space.

View file

@ -298,6 +298,9 @@ public class EntityRule {
} else if ("$multifrom".equals(keyword)) {
if (message.from == null || message.from.length < 2)
return false;
} else if ("$automatic".equals(keyword)) {
if (!Boolean.TRUE.equals(message.auto_submitted))
return false;
} else {
List<String> keywords = new ArrayList<>();
keywords.addAll(Arrays.asList(message.keywords));

View file

@ -1691,6 +1691,7 @@ public class MessageHelper {
Boolean getAutoSubmitted() throws MessagingException {
// https://tools.ietf.org/html/rfc3834
// auto-generated, auto-replied
String header = imessage.getHeader("Auto-Submitted", null);
if (header == null) {
// https://www.arp242.net/autoreply.html