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:
parent
29afe62fca
commit
f714cdc218
2 changed files with 9 additions and 1 deletions
4
FAQ.md
4
FAQ.md
|
@ -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.
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue