import org.ibex.io.*;
import org.ibex.jinetd.Listener;
import org.ibex.jinetd.Worker;
-import org.ibex.net.*;
import org.ibex.mail.*;
import org.ibex.util.*;
import org.ibex.mail.target.*;
String response = "";
for(int i=0; i<list.length; i++) {
String s = list[i].atom().toUpperCase();
+ if (i>0) response += " ";
if (s.equals("MESSAGES")) response += "MESSAGES " + api.count(mailbox);
if (s.equals("RECENT")) response += "RECENT " + api.recent(mailbox);
if (s.equals("UIDNEXT")) response += "UIDNEXT " + api.uidNext(mailbox);
case APPEND: {
String m = token().astring();
int flags = 0;
- Date arrival = null;
+ Date arrival = new Date();
Parser.Token t = token();
if (t.type == t.LIST) { flags = t.flags(); t = token(); }
if (t.type != t.QUOTED) { arrival = t.datetime(); t = token(); }
if (c == '\r' || c == '\n') { if (freak) bad("unexpected end of line"); return null; }
else if (c == '{') {
while(stream.peekc() != '}') sb.append(stream.getc());
+ stream.getc();
stream.println("+ Ready when you are...");
int octets = Integer.parseInt(sb.toString());
while(stream.peekc() == ' ') stream.getc(); // whitespace
- while (stream.getc() != '\n' && stream.getc() != '\r') { }
+ while(stream.peekc() == '\n' || stream.peekc() == '\r') stream.getc();
byte[] bytes = new byte[octets];
int numread = 0;
while(numread < bytes.length) {