diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index b3eb0f58e4..9fbb9085b6 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1207,6 +1207,9 @@ class Core { Message[] imessages = ifolder.getMessages(); Log.i(folder.name + " POP messages=" + imessages.length); + + // Some servers send messages once only + // Prevent deleting all local messages if (imessages.length == 0) return; @@ -1228,7 +1231,7 @@ class Core { MessageHelper helper = new MessageHelper((MimeMessage) imessage); - String msgid = null; + String msgid; if (caps.containsKey("UIDL")) { String uid = ifolder.getUID(imessage); if (existing.contains(uid)) diff --git a/app/src/main/java/eu/faircode/email/EntityAccount.java b/app/src/main/java/eu/faircode/email/EntityAccount.java index 6cb72067d4..6a6b4f30db 100644 --- a/app/src/main/java/eu/faircode/email/EntityAccount.java +++ b/app/src/main/java/eu/faircode/email/EntityAccount.java @@ -85,7 +85,7 @@ public class EntityAccount extends EntityOrder implements Serializable { @NonNull public Boolean notify = false; @NonNull - public Boolean browse = true; // Leave messages on server + public Boolean browse = true; // POP3: Leave messages on server @NonNull public Boolean auto_seen = true; public Character separator; diff --git a/app/src/main/java/eu/faircode/email/MailService.java b/app/src/main/java/eu/faircode/email/MailService.java index df5a51e12f..0ed79da276 100644 --- a/app/src/main/java/eu/faircode/email/MailService.java +++ b/app/src/main/java/eu/faircode/email/MailService.java @@ -242,6 +242,7 @@ public class MailService implements AutoCloseable { //System.setProperty("mail.socket.debug", Boolean.toString(debug)); if ("pop3".equals(protocol) || "pop3s".equals(protocol)) { + isession.setDebug(true); iservice = isession.getStore(protocol); iservice.connect(host, port, user, password);