// Server //////////////////////////////////////////////////////////////////////////////
public static class Server {
- public void handleRequest(Connection conn) {
+ public void handleRequest(Connection conn) throws IOException {
conn.setTimeout(5 * 60 * 1000);
conn.setNewline("\r\n");
conn.println("220 " + conn.vhost + " SMTP " + this.getClass().getName());
String remotehost = null;
for(String command = conn.readln(); ; command = conn.readln()) try {
if (command == null) return;
- Log.warn("**"+conn.getRemoteAddress()+"**", command);
+ //Log.warn("**"+conn.getRemoteAddress()+"**", command);
String c = command.toUpperCase();
if (c.startsWith("HELO")) {
remotehost = c.substring(5).trim();
} catch (MailException.Malformed mfe) { conn.println("501 " + mfe.toString());
} catch (MailException.MailboxFull mbf) { conn.println("452 " + mbf);
} catch (Later.LaterException le) { conn.println("453 try again later");
- } catch (IOException ioe) {
- //conn.println("554 " + ioe.toString());
- Log.error(this, ioe);
- conn.close();
- return;
}
} else { conn.println("500 unrecognized command"); }
} catch (Message.Malformed e) { conn.println("501 " + e.toString()); }