projects
/
org.ibex.mail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a7cd79
)
handle null-sender
author
adam
<adam@megacz.com>
Wed, 11 Aug 2004 01:35:33 +0000
(
01:35
+0000)
committer
adam
<adam@megacz.com>
Wed, 11 Aug 2004 01:35:33 +0000
(
01:35
+0000)
darcs-hash:
20040811013533
-5007d-
4f6cb67e879a6f51163332eb712cc5bda2387a47
.gz
src/org/ibex/mail/protocol/SMTP.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/mail/protocol/SMTP.java
b/src/org/ibex/mail/protocol/SMTP.java
index
33ff3a5
..
8ee0ce3
100644
(file)
--- a/
src/org/ibex/mail/protocol/SMTP.java
+++ b/
src/org/ibex/mail/protocol/SMTP.java
@@
-40,9
+40,11
@@
public class SMTP {
} else if (c.startsWith("NOOP")) { conn.println("250 OK");
} else if (c.startsWith("QUIT")) { conn.println("221 " + conn.vhost + " closing connection"); return;
} else if (c.startsWith("MAIL FROM:")) {
} else if (c.startsWith("NOOP")) { conn.println("250 OK");
} else if (c.startsWith("QUIT")) { conn.println("221 " + conn.vhost + " closing connection"); return;
} else if (c.startsWith("MAIL FROM:")) {
- conn.println("250 " + (from = new Address(command.substring(10).trim())) + " is syntactically correct");
+ command = command.substring(10).trim();
+ from = command.equals("<>") ? null : new Address(command);
+ conn.println("250 " + from + " is syntactically correct");
} else if (c.startsWith("RCPT TO:")) {
} else if (c.startsWith("RCPT TO:")) {
- if (from == null) { conn.println("503 MAIL FROM must precede RCPT TO"); continue; }
+ //if (from == null) { conn.println("503 MAIL FROM must precede RCPT TO"); continue; }
command = command.substring(8).trim();
if(command.indexOf(' ') != -1) command = command.substring(0, command.indexOf(' '));
Address addr = new Address(command);
command = command.substring(8).trim();
if(command.indexOf(' ') != -1) command = command.substring(0, command.indexOf(' '));
Address addr = new Address(command);