Preserving LOGINDISABLED

pull/194/head
M66B 4 years ago
parent 542fee58a8
commit e71cf9ee4d

@ -750,7 +750,12 @@ public class IMAPStore extends Store
if (p.hasCapability("STARTTLS")) {
p.startTLS();
// if startTLS succeeds, refresh capabilities
boolean logindisabled = p.hasCapability("LOGINDISABLED");
p.capability();
if (logindisabled && !p.hasCapability("LOGINDISABLED")) {
eu.faircode.email.Log.e("Preserving LOGINDISABLED");
p.setCapability("LOGINDISABLED");
}
} else if (requireStartTLS) {
logger.fine("STARTTLS required but not supported by server");
throw new ProtocolException(

@ -412,6 +412,10 @@ public class IMAPProtocol extends Protocol {
return capabilities.containsKey(c.toUpperCase(Locale.ENGLISH));
}
public void setCapability(String c) {
capabilities.put(c.toUpperCase(Locale.ENGLISH), c);
}
/**
* Return the map of capabilities returned by the server.
*

Loading…
Cancel
Save