adjusted for changes to jinetd
[org.ibex.mail.git] / src / org / ibex / mail / Main.java
index f3465c8..0095b1e 100644 (file)
@@ -16,7 +16,7 @@ import org.ibex.crypto.*;
 
 public class Main implements Listener {
 
-    public void accept(Connection conn) {
+    public boolean accept(Connection conn) {
         try {
             if      (conn.getLocalPort() == 143)  new IMAP.Listener(auth).handleRequest(conn);
             else if (conn.getLocalPort() == 25)   new SMTP.Server().handleRequest(conn);
@@ -24,6 +24,8 @@ public class Main implements Listener {
             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);
+           else return false;
+           return true;
         } finally {
             conn.close();
         }