change num() to imapNumber() and nntpNumber(), add comments about semantics
[org.ibex.mail.git] / src / org / ibex / mail / protocol / SMTP.java
index 37686c6..af62e21 100644 (file)
@@ -74,7 +74,7 @@ public class SMTP {
     // 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());
@@ -84,7 +84,7 @@ public class SMTP {
             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();
@@ -191,11 +191,6 @@ public class SMTP {
                     } 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()); }