From a555f82fe40f01d621ea027e0c0de9de0ca049c3 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 6 Mar 2021 16:48:53 +0100 Subject: [PATCH] Added logging --- app/src/main/java/eu/faircode/email/EmailProvider.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/EmailProvider.java b/app/src/main/java/eu/faircode/email/EmailProvider.java index 78e5eb28cf..7c2626e74b 100644 --- a/app/src/main/java/eu/faircode/email/EmailProvider.java +++ b/app/src/main/java/eu/faircode/email/EmailProvider.java @@ -350,6 +350,8 @@ public class EmailProvider { XmlPullParser xml = factory.newPullParser(); xml.setInput(new InputStreamReader(request.getInputStream())); + EntityLog.log(context, "Parsing " + url); + boolean imap = false; boolean smtp = false; String href = null; @@ -526,6 +528,7 @@ public class EmailProvider { provider.imap.host = records[0].name; provider.imap.port = records[0].port; provider.imap.starttls = false; + EntityLog.log(context, "_imaps._tcp." + domain + "=" + provider.imap); } catch (UnknownHostException ignored) { // Identifies an IMAP server that MAY ... require the MUA to use the "STARTTLS" command DnsHelper.DnsRecord[] records = DnsHelper.lookup(context, "_imap._tcp." + domain, "srv"); @@ -534,6 +537,7 @@ public class EmailProvider { provider.imap.host = records[0].name; provider.imap.port = records[0].port; provider.imap.starttls = (provider.imap.port == 143); + EntityLog.log(context, "_imap._tcp." + domain + "=" + provider.imap); } } @@ -546,6 +550,7 @@ public class EmailProvider { provider.smtp.host = records[0].name; provider.smtp.port = records[0].port; provider.smtp.starttls = (provider.smtp.port == 587); + EntityLog.log(context, "_submission._tcp." + domain + "=" + provider.smtp); } catch (UnknownHostException ignored) { // https://tools.ietf.org/html/rfc8314 DnsHelper.DnsRecord[] records = DnsHelper.lookup(context, "_submissions._tcp." + domain, "srv"); @@ -554,6 +559,7 @@ public class EmailProvider { provider.smtp.host = records[0].name; provider.smtp.port = records[0].port; provider.smtp.starttls = false; + EntityLog.log(context, "_submissions._tcp." + domain + "=" + provider.smtp); } provider.validate();