Added rule condition $$automatic

pull/207/head
M66B 2 years ago
parent b544b4e457
commit 82d523db04

@ -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.

@ -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));

@ -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

Loading…
Cancel
Save