X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2FSMTP.java;h=9ca85c8b5e6cb6a1b005d2d77af5d743112ab656;hb=c904ac6c7813958e79d19eb772df8cf83c8775b3;hp=039b3a7f176b66bd10c2d0127f1c1fd3f8280f96;hpb=bea75eed0419e5888bda70d9cb1f3951a1a6d510;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/SMTP.java b/src/org/ibex/mail/SMTP.java index 039b3a7..9ca85c8 100644 --- a/src/org/ibex/mail/SMTP.java +++ b/src/org/ibex/mail/SMTP.java @@ -16,6 +16,9 @@ import javax.naming.directory.*; // FIXME: inbound throttling/ratelimiting +// "Address enumeration detection" -- notice when it looks like somebody +// is trying a raft of addresses. + // RFC's implemented // RFC2554: SMTP Service Extension for Authentication // - did not implement section 5, though @@ -46,11 +49,16 @@ public class SMTP { public static final int GRAYLIST_MINWAIT = 1000 * 60 * 60; // one hour public static final int GRAYLIST_MAXWAIT = 1000 * 60 * 60 * 24 * 5; // five days - public static final Graylist graylist = - new Graylist(Mailbox.STORAGE_ROOT+"/db/graylist.sqlite"); - - public static final Whitelist whitelist = - new Whitelist(Mailbox.STORAGE_ROOT+"/db/whitelist.sqlite"); + public static final Graylist graylist; + public static final Whitelist whitelist; + static { + try { + graylist = new Graylist(Mailbox.STORAGE_ROOT+"/db/graylist.sqlite"); + whitelist = new Whitelist(Mailbox.STORAGE_ROOT+"/db/whitelist.sqlite"); + } catch (Exception e) { + throw new RuntimeException(e); + } + } public static final int MAX_MESSAGE_SIZE = Integer.parseInt(System.getProperty("org.ibex.mail.smtp.maxMessageSize", "-1"));