Apply sender rule condition to from and reply-to

pull/194/merge
M66B 3 years ago
parent 9034c9360a
commit d0a5e3e1ea

@ -157,9 +157,13 @@ public class EntityRule {
boolean known = jsender.optBoolean("known");
boolean matches = false;
if (message.from != null) {
for (Address from : message.from) {
InternetAddress ia = (InternetAddress) from;
List<Address> senders = new ArrayList<>();
if (message.from != null)
senders.addAll(Arrays.asList(message.from));
if (message.reply != null)
senders.addAll(Arrays.asList(message.reply));
for (Address sender : senders) {
InternetAddress ia = (InternetAddress) sender;
String email = ia.getAddress();
String personal = ia.getPersonal();
@ -190,7 +194,6 @@ public class EntityRule {
}
}
}
}
if (!matches)
return false;
}

Loading…
Cancel
Save