mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 09:47:13 +00:00
Added max. TLS to provider profiles
This commit is contained in:
parent
b901fde5f2
commit
df92814dcb
3 changed files with 24 additions and 2 deletions
|
@ -88,6 +88,7 @@ public class EmailProvider implements Parcelable {
|
|||
public boolean partial;
|
||||
public boolean useip;
|
||||
public boolean appPassword;
|
||||
public String maxtls;
|
||||
public String link;
|
||||
public Server imap = new Server();
|
||||
public Server smtp = new Server();
|
||||
|
@ -241,6 +242,7 @@ public class EmailProvider implements Parcelable {
|
|||
provider.partial = getAttributeBooleanValue(xml, "partial", true);
|
||||
provider.useip = getAttributeBooleanValue(xml, "useip", true);
|
||||
provider.appPassword = getAttributeBooleanValue(xml, "appPassword", false);
|
||||
provider.maxtls = xml.getAttributeValue(null, "maxtls");
|
||||
provider.link = xml.getAttributeValue(null, "link");
|
||||
|
||||
String documentation = xml.getAttributeValue(null, "documentation");
|
||||
|
|
|
@ -47,6 +47,7 @@ import com.sun.mail.util.SocketConnectException;
|
|||
import com.sun.mail.util.TraceOutputStream;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
@ -430,7 +431,18 @@ public class EmailService implements AutoCloseable {
|
|||
}
|
||||
}
|
||||
|
||||
factory = new SSLSocketFactoryService(host, insecure, ssl_harden, ssl_harden_strict, cert_strict, key, chain, fingerprint);
|
||||
boolean strict = ssl_harden_strict;
|
||||
if (provider != null)
|
||||
try {
|
||||
EmailProvider p = EmailProvider.getProvider(context, provider);
|
||||
if ("1.2".equals(p.maxtls)) {
|
||||
strict = false;
|
||||
Log.i(p.name + " maxtls=" + p.maxtls);
|
||||
}
|
||||
} catch (FileNotFoundException ignored) {
|
||||
}
|
||||
|
||||
factory = new SSLSocketFactoryService(host, insecure, ssl_harden, strict, cert_strict, key, chain, fingerprint);
|
||||
properties.put("mail." + protocol + ".ssl.socketFactory", factory);
|
||||
properties.put("mail." + protocol + ".socketFactory.fallback", "false");
|
||||
properties.put("mail." + protocol + ".ssl.checkserveridentity", "false");
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
name="Outlook"
|
||||
domain="outlook\\..*"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
maxtls="1.2"
|
||||
noop="true"
|
||||
order="2"
|
||||
partial="false"
|
||||
|
@ -61,6 +62,7 @@
|
|||
name="Live"
|
||||
domain="live\\..*"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
maxtls="1.2"
|
||||
noop="true"
|
||||
order="3"
|
||||
partial="false"
|
||||
|
@ -78,6 +80,7 @@
|
|||
name="Hotmail"
|
||||
domain="hotmail\\..*"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
maxtls="1.2"
|
||||
noop="true"
|
||||
order="4"
|
||||
partial="false"
|
||||
|
@ -94,6 +97,7 @@
|
|||
<provider
|
||||
name="MSN"
|
||||
domain="\\.msn\\..*"
|
||||
maxtls="1.2"
|
||||
partial="false">
|
||||
<imap
|
||||
host="imap-mail.outlook.com"
|
||||
|
@ -110,6 +114,7 @@
|
|||
enabled="false"
|
||||
id="office365"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
maxtls="1.2"
|
||||
noop="true"
|
||||
order="5"
|
||||
partial="false"
|
||||
|
@ -148,6 +153,7 @@
|
|||
description="Outlook/Office 365"
|
||||
id="office365pcke"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
maxtls="1.2"
|
||||
noop="true"
|
||||
order="5"
|
||||
partial="false"
|
||||
|
@ -186,6 +192,7 @@
|
|||
enabled="false"
|
||||
id="outlook"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
maxtls="1.2"
|
||||
noop="true"
|
||||
order="5"
|
||||
partial="false"
|
||||
|
@ -793,7 +800,8 @@
|
|||
<provider
|
||||
name="Runbox"
|
||||
domain="runbox\\..*"
|
||||
link="https://help.runbox.com/email-program-settings/">
|
||||
link="https://help.runbox.com/email-program-settings/"
|
||||
maxtls="1.2">
|
||||
<imap
|
||||
host="mail.runbox.com"
|
||||
port="993"
|
||||
|
|
Loading…
Reference in a new issue