mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 21:24:34 +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$
|
$$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$
|
$$dkim$
|
||||||
|
@ -2416,6 +2416,8 @@ $$dmarc$
|
||||||
$$mx$
|
$$mx$
|
||||||
$$blocklist$
|
$$blocklist$
|
||||||
$$replydomain$
|
$$replydomain$
|
||||||
|
$$nofrom$
|
||||||
|
$$multifrom$
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that *regex* should be disable and that there should be no white space.
|
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)) {
|
} else if ("$replydomain".equals(keyword)) {
|
||||||
if (!Boolean.TRUE.equals(message.reply_domain))
|
if (!Boolean.TRUE.equals(message.reply_domain))
|
||||||
return false;
|
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 {
|
} else {
|
||||||
List<String> keywords = new ArrayList<>();
|
List<String> keywords = new ArrayList<>();
|
||||||
keywords.addAll(Arrays.asList(message.keywords));
|
keywords.addAll(Arrays.asList(message.keywords));
|
||||||
|
|
Loading…
Reference in a new issue