X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2FMailingList.java;fp=src%2Forg%2Fibex%2Fmail%2FMailingList.java;h=c0c3354b7d018f4da6747fa04f9b756adcab15a9;hb=02a0f9b2334d98d3d71bca73b8a90f5a36f6a5f3;hp=636fa4e6668816ee50338591706e92d4801864c4;hpb=f6b2541e584cd8a554b965c8de21896410239e21;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/MailingList.java b/src/org/ibex/mail/MailingList.java index 636fa4e..c0c3354 100644 --- a/src/org/ibex/mail/MailingList.java +++ b/src/org/ibex/mail/MailingList.java @@ -37,12 +37,13 @@ public class MailingList extends Persistent implements Target { public int bounceThreshhold = 10; public static class Subscriber { + public Subscriber(Address a) { this.address = a; } public Address address; - public Action posting; - public UserType type; - public SubscriptionType subscription; - public boolean send_copy_of_own_post; - public boolean filter_duplicates_when_ccd; + public Action posting = Action.Accept; + public UserType type = UserType.Member; + public SubscriptionType subscription = SubscriptionType.All; + public boolean send_copy_of_own_post = false; + public boolean filter_duplicates_when_ccd = true; } @@ -52,9 +53,9 @@ public class MailingList extends Persistent implements Target { public static MailingList getMailingList(String path) { return getMailingList(new File(path)); } public static MailingList getMailingList(File path) { if (!path.exists()) path.mkdirs(); - File f = new File(path.getAbsolutePath() + File.separatorChar + ".mailinglist"); + path = new File(path.getAbsolutePath() + File.separatorChar + ".mailinglist"); try { - if (f.exists()) return (MailingList)Persistent.read(f); + if (path.exists()) return (MailingList)Persistent.read(path); MailingList ret = new MailingList(path); ret.write(); return ret; @@ -66,7 +67,7 @@ public class MailingList extends Persistent implements Target { // Methods ////////////////////////////////////////////////////////////////////////////// - public Mailbox getArchive() { return FileBasedMailbox.getFileBasedMailbox(path, true); } + public Mailbox getArchive() { return FileBasedMailbox.getFileBasedMailbox(file.getParent(), true); } public void accept(Message m) throws IOException, MailException { StringBuffer buf = new StringBuffer();