Allow matching domain names

pull/199/head
M66B 4 years ago
parent 1d5028653b
commit f186c2b37b

@ -1440,6 +1440,7 @@ It is possible to configure a [regex](https://en.wikipedia.org/wiki/Regular_expr
to match **the username** of an email address (the part before the @ sign).
Note that the domain name (the parts after the @ sign) always needs to be equal to the domain name of the identity.
Since version 1.1640 it is possible to match the full email address with a regex, which can be useful for matching alias domain names.
If you like to match a catch-all email address, this regex is mostly okay:

@ -157,12 +157,12 @@ public class EntityIdentity {
if (cother.length != 2 || cemail.length != 2)
return false;
// Domain
if (!cother[1].equalsIgnoreCase(cemail[1]))
return false;
// User
if (TextUtils.isEmpty(sender_extra_regex)) {
// Domain
if (!cother[1].equalsIgnoreCase(cemail[1]))
return false;
// User
int plus = cother[0].indexOf('+');
String user = (plus < 0 ? cother[0] : cother[0].substring(0, plus));
if (user.equalsIgnoreCase(cemail[0]))

Loading…
Cancel
Save