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.*;
}
// 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;
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; }
--- /dev/null
+// 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; }
+ }
+}