disable everything that requires extraneous third-party jarfiles
[org.ibex.mail.git] / src / org / ibex / mail / target / Reject.java
diff --git a/src/org/ibex/mail/target/Reject.java b/src/org/ibex/mail/target/Reject.java
new file mode 100644 (file)
index 0000000..c41630f
--- /dev/null
@@ -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; }
+    }
+}