public static class Server implements Worker {
public void handleRequest(Connection conn) {
+ Log.error(this, "accepted...");
conn.setTimeout(5 * 60 * 1000);
conn.println("220 " + conn.vhost + " SMTP " + this.getClass().getName());
Address from = null;
((flags & Mailbox.Flag.ANSWERED) == Mailbox.Flag.ANSWERED ? "a" : "") +
((flags & Mailbox.Flag.FLAGGED) == Mailbox.Flag.FLAGGED ? "f" : "") +
((flags & Mailbox.Flag.SEEN) == Mailbox.Flag.SEEN ? "s" : "");
+ Log.info(this, " with chosen filename " + name);
File target = new File(name);
File f = new File(target.getCanonicalPath() + "-");
FileOutputStream fo = new FileOutputStream(f);
message.dump(new Stream(fo));
fo.close();
f.renameTo(target);
+ Log.info(this, " done writing.");
} catch (IOException e) { throw new MailException.IOException(e); }
}