fix too many open files problem
[org.ibex.mail.git] / src / org / ibex / mail / Main.java
1 package org.ibex.mail;
2 import org.ibex.mail.target.*;
3 import org.ibex.mail.protocol.*;
4 import org.ibex.util.*;
5 import org.ibex.jinetd.*;
6 import org.ibex.io.*;
7 import java.io.*;
8 import java.net.*;
9 import java.util.*;
10 import org.ibex.crypto.*;
11
12 public class Main implements Listener {
13
14     public void accept(Connection conn) {
15         Log.error(this, "connection port is " + conn.getLocalPort());
16         if (conn.getLocalPort() == 25) {
17             new SMTP.Server().handleRequest(conn);
18         } else if (conn.getLocalPort() == 143) {
19             new IMAP.Listener().handleRequest(conn);
20         }
21     }
22
23 }