Revert "Added option to block return path"

This reverts commit 84c94c79db.
This commit is contained in:
M66B
2022-01-30 16:42:12 +01:00
parent c62f616148
commit 0d5b4e49d4
7 changed files with 18 additions and 112 deletions

View File

@@ -4058,37 +4058,6 @@ public class MessageHelper {
return result.toArray(new InternetAddress[0]);
}
static List<Address> exclusive(Address[] address, Address[] base) {
if (address == null || address.length == 0 ||
base == null || base.length == 0)
return Arrays.asList(address == null ? new Address[0] : address);
// Should dedup
List<Address> result = new ArrayList<>();
for (Address a : address)
if (a instanceof InternetAddress) {
String email = ((InternetAddress) a).getAddress();
if (TextUtils.isEmpty(email))
continue;
boolean found = false;
for (Address b : base)
if (b instanceof InternetAddress) {
String other = ((InternetAddress) b).getAddress();
if (TextUtils.isEmpty(other))
continue;
if (email.equalsIgnoreCase(other)) {
found = true;
break;
}
}
if (!found)
result.add(a);
}
return result;
}
static boolean isRemoved(Throwable ex) {
while (ex != null) {
if (ex instanceof MessageRemovedException ||