1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-30 19:56:10 +00:00

Added no/multi from header condition

This commit is contained in:
M66B 2021-12-17 17:35:13 +01:00
parent 29afe62fca
commit f714cdc218
2 changed files with 9 additions and 1 deletions

4
FAQ.md
View file

@ -2407,7 +2407,7 @@ $$flagged$
$$deleted$
```
To match *passed* message checks via a header condition (since version 1.1787):
To match *passed* message checks via a header condition (since version 1.1787; no/multi-from since version 1.1791):
```
$$dkim$
@ -2416,6 +2416,8 @@ $$dmarc$
$$mx$
$$blocklist$
$$replydomain$
$$nofrom$
$$multifrom$
```
Note that *regex* should be disable and that there should be no white space.

View file

@ -283,6 +283,12 @@ public class EntityRule {
} else if ("$replydomain".equals(keyword)) {
if (!Boolean.TRUE.equals(message.reply_domain))
return false;
} else if ("$nofrom".equals(keyword)) {
if (message.from != null && message.from.length > 0)
return false;
} else if ("$multifrom".equals(keyword)) {
if (message.from == null || message.from.length < 2)
return false;
} else {
List<String> keywords = new ArrayList<>();
keywords.addAll(Arrays.asList(message.keywords));