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 (from parent 1:
6f13c82
)
fixed a spam hole
author
adam
<adam@megacz.com>
Tue, 17 Jan 2006 03:49:32 +0000
(
03:49
+0000)
committer
adam
<adam@megacz.com>
Tue, 17 Jan 2006 03:49:32 +0000
(
03:49
+0000)
darcs-hash:
20060117034932
-5007d-
d7354e5ddbfd7e731608e66c2024be4e038f324a
.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
d03c24e
..
32c25f6
100644
(file)
--- a/
src/org/ibex/mail/protocol/SMTP.java
+++ b/
src/org/ibex/mail/protocol/SMTP.java
@@
-93,7
+93,8
@@
public class SMTP {
if (addr.isLocal()) {
// FEATURE: should check the address further and give 550 if undeliverable
conn.println("250 " + addr + " is on this machine; I will deliver it");
if (addr.isLocal()) {
// FEATURE: should check the address further and give 550 if undeliverable
conn.println("250 " + addr + " is on this machine; I will deliver it");
- } else if (conn.getRemoteAddress().isLoopbackAddress())
+ to.addElement(addr);
+ } else if (conn.getRemoteAddress().isLoopbackAddress()) {
conn.println("250 you are connected locally, so I will let you send");
to.addElement(addr);
} else {
conn.println("250 you are connected locally, so I will let you send");
to.addElement(addr);
} else {
@@
-101,7
+102,7
@@
public class SMTP {
}
} else if (c.startsWith("DATA")) {
//if (from == null) { conn.println("503 MAIL FROM command must precede DATA"); continue; }
}
} else if (c.startsWith("DATA")) {
//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; }
+ if (to == null || to.size()==0) { conn.println("503 RCPT TO command must precede DATA"); continue; }
conn.println("354 Enter message, ending with \".\" on a line by itself");
conn.flush();
try {
conn.println("354 Enter message, ending with \".\" on a line by itself");
conn.flush();
try {