mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 21:57:19 +00:00
Added rule condition $$automatic
This commit is contained in:
parent
b544b4e457
commit
82d523db04
3 changed files with 5 additions and 0 deletions
1
FAQ.md
1
FAQ.md
|
@ -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…
Reference in a new issue