IMAP message numbers start at 1, not 0
[org.ibex.mail.git] / src / org / ibex / mail / target / FileBasedMailbox.java
index 2462a28..8bf36ad 100644 (file)
@@ -160,7 +160,10 @@ public class FileBasedMailbox extends Mailbox.Default implements Serializable {
             recent = true;
             return true;
         }
-        public int num() { return cur; }
+
+        // EUDORA insists that message numbers start at 1, not 0
+        public int num() { return cur+1; }
+
         public int uid() {
             try { return Integer.parseInt(names[cur].substring(0, names[cur].indexOf('.')));
             } catch (NumberFormatException nfe) {