bugfix to deal with null MAIL-FROMs
authoradam <adam@megacz.com>
Sun, 27 Feb 2005 20:34:47 +0000 (20:34 +0000)
committeradam <adam@megacz.com>
Sun, 27 Feb 2005 20:34:47 +0000 (20:34 +0000)
darcs-hash:20050227203447-5007d-2f62d16b74240603df3fb494a01e89221fcffca2.gz

src/org/ibex/mail/protocol/SMTP.java
src/org/ibex/mail/target/Script.java

index f7463e8..6cfd116 100644 (file)
@@ -88,7 +88,7 @@ public class SMTP {
                     else { conn.println("551 sorry, " + addr + " is not on this machine"); }
                     to.addElement(addr);
                 } else if (c.startsWith("DATA")) {
-                    if (from == null) { conn.println("503 MAIL FROM command must precede DATA"); continue; }
+                    //if (from == null) { conn.println("503 MAIL FROM command must precede DATA"); continue; }
                     if (to == null) { conn.println("503 RCPT TO command must precede DATA"); continue; }
                     conn.println("354 Enter message, ending with \".\" on a line by itself");
                     conn.flush();
index d68d91e..2f00ca4 100644 (file)
@@ -190,8 +190,7 @@ public class Script extends Target {
                     return null;
                 }
                 if (name.equals("mail.forward") || name.equals("forward")) {
-                    Message m = (Message)a;
-                    Message m2 = Message.newMessage(m, m.envelopeFrom, new Address(JSU.toString(a)));
+                    Message m2 = Message.newMessage(Script.this.m, Script.this.m.envelopeFrom, new Address(JSU.toString(a)));
                     org.ibex.mail.protocol.SMTP.Outgoing.attempt(m2);
                     return Drop.instance;
                 }