+ public static Date parseDate(String s) {
+ // FIXME!!! this must be robust
+ // date/time parsing: see spec, 3.3
+ return null;
+ }
+
+ // 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;
+
+ Log.warn(Message.class, "bouncing message due to: " + reason);
+ Headers h = new Headers.Original(headers.getStream());
+ h = h.set(new String[] {
+ "Envelope-To", envelopeFrom.toString(),
+ "Return-Path", "<>",
+ "From", "MAILER-DAEMON <>",
+ "To", envelopeFrom.toString(),
+ "Subject", "failure notice"
+ });
+
+ String error =
+ "Hi. This is the Ibex Mail Server. I'm afraid I wasn't able to deliver\r\n"+
+ "your message to the following addresses. This is a permanent error;\r\n"+
+ "I've given up. Sorry it didn't work out\r\n."+
+ "\r\n"+
+ "<"+envelopeTo.toString()+">:\r\n"+
+ reason+"\r\n"+
+ "\r\n"+
+ "--- Below this line is a copy of the message.\r\n"+
+ "\r\n";
+
+ try {
+ return newMessage(new Fountain.Concatenate(new Fountain.StringFountain(h.getString()+"\r\n"+error), getBody()));
+ } catch (Message.Malformed e) {
+ Log.error(this, "caught Message.Malformed in Message.bounce(); this should never happen");
+ Log.error(this, e);
+ 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!
+
+^ ^ ^ ^ ^ ^ ^