minor changes for Jetty
authoradam <adam@megacz.com>
Fri, 18 Mar 2005 09:10:58 +0000 (09:10 +0000)
committeradam <adam@megacz.com>
Fri, 18 Mar 2005 09:10:58 +0000 (09:10 +0000)
darcs-hash:20050318091058-5007d-2a6394d71ccb517cf8f50b61ca1acb0a63fcf7c0.gz

src/org/ibex/mail/Main.java
src/org/ibex/mail/protocol/NNTP.java
src/org/ibex/mail/protocol/SMTP.java

index 6ef2763..f3465c8 100644 (file)
@@ -7,6 +7,7 @@ import org.ibex.mail.target.*;
 import org.ibex.mail.protocol.*;
 import org.ibex.util.*;
 import org.ibex.jinetd.*;
+import org.ibex.jetty.*;
 import org.ibex.io.*;
 import java.io.*;
 import java.net.*;
@@ -21,6 +22,8 @@ public class Main implements Listener {
             else if (conn.getLocalPort() == 25)   new SMTP.Server().handleRequest(conn);
             else if (conn.getLocalPort() == 119)  new NNTP.Listener(auth).handleRequest(conn);
             else if (conn.getLocalPort() == 8099) GMail.handleRequest(conn);
+            else if (conn.getLocalPort() == 8080) Jetty.instance().accept(conn);
+            else if (conn.getLocalPort() == 80)   Jetty.instance().accept(conn);
         } finally {
             conn.close();
         }
index ddaeeba..c0f9517 100644 (file)
@@ -74,7 +74,6 @@ public class NNTP {
             if (!it.next()) return null;
             try {
                 Message m = body ? it.cur() : Message.newMessage(new Fountain.StringFountain(it.head() + "\r\n"));
-                //Message m = it.cur(); // FIXME
                 return new Article(it.num(), m);
             } catch (Exception e) { return null; }
         }
index 6cfd116..2fc51a3 100644 (file)
@@ -118,6 +118,7 @@ public class SMTP {
                         from = null; to = new Vector();
                     } 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);