|
|
|
@ -1016,19 +1016,26 @@ public class MessageHelper {
|
|
|
|
|
return getAddressHeader("Disposition-Notification-To");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getAuthentication() throws MessagingException {
|
|
|
|
|
String[] getAuthentication() throws MessagingException {
|
|
|
|
|
ensureMessage(false);
|
|
|
|
|
|
|
|
|
|
String header = imessage.getHeader("Authentication-Results", null);
|
|
|
|
|
return (header == null ? null : MimeUtility.unfold(header));
|
|
|
|
|
String[] headers = imessage.getHeader("Authentication-Results");
|
|
|
|
|
if (headers == null)
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < headers.length; i++)
|
|
|
|
|
headers[i] = MimeUtility.unfold(headers[i]);
|
|
|
|
|
|
|
|
|
|
return headers;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Boolean getAuthentication(String type, String header) {
|
|
|
|
|
if (header == null)
|
|
|
|
|
static Boolean getAuthentication(String type, String[] headers) {
|
|
|
|
|
if (headers == null)
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
// https://tools.ietf.org/html/rfc7601
|
|
|
|
|
Boolean result = null;
|
|
|
|
|
for (String header : headers) {
|
|
|
|
|
String[] part = header.split(";");
|
|
|
|
|
for (int i = 1; i < part.length; i++) {
|
|
|
|
|
String[] kv = part[i].split("=");
|
|
|
|
@ -1044,6 +1051,7 @@ public class MessageHelper {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|