From 4547c286cc34a32c3f4348e2dbce9bd43a81aa84 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 10 Jul 2006 00:32:05 +0000 Subject: [PATCH] disable everything that requires extraneous third-party jarfiles darcs-hash:20060710003205-5007d-490a11e2d4b206c05f5cb30ae1e07f05ebaa2cdf.gz --- src/org/ibex/mail/MailingList.java | 4 ++-- src/org/ibex/mail/Message.java | 22 ---------------------- src/org/ibex/mail/target/Reject.java | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 src/org/ibex/mail/target/Reject.java diff --git a/src/org/ibex/mail/MailingList.java b/src/org/ibex/mail/MailingList.java index 82c5ec3..90f2487 100644 --- a/src/org/ibex/mail/MailingList.java +++ b/src/org/ibex/mail/MailingList.java @@ -10,8 +10,8 @@ import org.ibex.mail.protocol.*; import java.util.*; import java.io.*; import java.net.*; -import org.prevayler.*; -import org.prevayler.Query; +//import org.prevayler.*; +//import org.prevayler.Query; import javax.servlet.*; import javax.servlet.http.*; diff --git a/src/org/ibex/mail/Message.java b/src/org/ibex/mail/Message.java index 46435f3..882ca9f 100644 --- a/src/org/ibex/mail/Message.java +++ b/src/org/ibex/mail/Message.java @@ -127,7 +127,6 @@ public class Message extends MIME.Part { } // this is belived to be compliant with QSBMF (http://cr.yp.to/proto/qsbmf.txt) -v v v v v v v public Message bounce(String reason) { if (envelopeFrom==null || envelopeFrom.toString().equals("")) return null; @@ -160,27 +159,6 @@ v v v v v v v return null; } } -************* -v v v v v v v - public Message bounce(String reason) { - Log.warn(Message.class, "bounce not implemented"); - return null; - } // FIXME! - -************* - public Message bounce(String reason) { - Log.warn(Message.class, "bounce not implemented"); - } // FIXME! - -^ ^ ^ ^ ^ ^ ^ - public String summary() { - return - " Subject: " + subject + "\n" + - " EnvelopeFrom: " + envelope.from + "\n" + - " EnvelopeTo: " + envelope.to + "\n" + - " MessageId: " + messageid; - } -^ ^ ^ ^ ^ ^ ^ public String toString() { throw new RuntimeException("Message.toString() called"); } public String summary() { return "[" + envelopeFrom + " -> " + envelopeTo + "] " + subject; } diff --git a/src/org/ibex/mail/target/Reject.java b/src/org/ibex/mail/target/Reject.java new file mode 100644 index 0000000..c41630f --- /dev/null +++ b/src/org/ibex/mail/target/Reject.java @@ -0,0 +1,23 @@ +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the Apache Public Source License 2.0 ("the License"). +// You may not use this file except in compliance with the License. + +package org.ibex.mail.target; +import java.io.*; +import org.ibex.js.*; +import org.ibex.util.*; +import org.ibex.mail.*; +import org.ibex.mail.target.*; + +public class Reject extends JS.Obj implements Target { + public final String reason; + public Reject(String reason) { this.reason = reason; } + public void accept(Message m) throws IOException, MailException { + throw new RejectException(m, reason); + } + public static class RejectException extends RuntimeException { + public final Message m; + public final String reason; + public RejectException(Message m, String reason) { this.m = m; this.reason = reason; } + } +} -- 1.7.10.4