2 import org.ibex.mail.target.*;
3 import org.ibex.mail.protocol.*;
4 import org.ibex.util.*;
5 import org.ibex.jinetd.*;
11 public class Main implements Listener {
13 public void accept(Connection conn) {
14 Log.error(this, "connection port is " + conn.getLocalPort());
15 if (conn.getLocalPort() == 25) { new SMTP.Server().handleRequest(conn);
16 } else if (conn.getLocalPort() == 143) { new IMAP.Listener().handleRequest(conn);
17 } else if (conn.getLocalPort() == 119) { new NNTP.Listener().handleRequest(conn);
22 public static class BogusAuthenticator implements IMAP.Server.Authenticator {
24 FileBasedMailbox.getFileBasedMailbox(Mailbox.STORAGE_ROOT, true).slash("user", true).slash("megacz", true);
25 public Mailbox authenticate(String u, String p) {
26 if (u.equals("megacz") && p.equals("pass")) return root;