Added $$tls$ rule condition

pull/194/merge
M66B 3 years ago
parent e233bfc740
commit 4737da53d8

@ -2430,17 +2430,18 @@ $$flagged$
$$deleted$ $$deleted$
``` ```
To match *passed* message checks via a header condition (since version 1.1787; no/multi-from since version 1.1791): To match *passed* message checks via a header condition (since version 1.1787):
``` ```
$$tls$ (since version 1.1826)
$$dkim$ $$dkim$
$$spf$ $$spf$
$$dmarc$ $$dmarc$
$$mx$ $$mx$
$$blocklist$ $$blocklist$
$$replydomain$ $$replydomain$
$$nofrom$ $$nofrom$ (since version 1.1791)
$$multifrom$ $$multifrom$ (since version 1.1791)
``` ```
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.

@ -271,7 +271,10 @@ public class EntityRule {
value.endsWith("$")) { value.endsWith("$")) {
String keyword = value.substring(1, value.length() - 1); String keyword = value.substring(1, value.length() - 1);
if ("$dkim".equals(keyword)) { if ("$tls".equals(keyword)) {
if (!Boolean.TRUE.equals(message.tls))
return false;
} else if ("$dkim".equals(keyword)) {
if (!Boolean.TRUE.equals(message.dkim)) if (!Boolean.TRUE.equals(message.dkim))
return false; return false;
} else if ("$spf".equals(keyword)) { } else if ("$spf".equals(keyword)) {

Loading…
Cancel
Save