danny 01/11/29 10:17:33
Modified: src/java/org/apache/james/smtpserver SMTPHandler.java
Log:
assume @localhost for username only recipients and senders
Revision Changes Path
1.11 +8 -2
jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java
Index: SMTPHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SMTPHandler.java 2001/11/29 13:40:25 1.10
+++ SMTPHandler.java 2001/11/29 18:17:33 1.11
@@ -44,8 +44,8 @@
* @author Matthew Pangaro <[EMAIL PROTECTED]>
* @author Danny Angus <[EMAIL PROTECTED]>
*
- * This is $Revision: 1.10 $
- * Committed on $Date: 2001/11/29 13:40:25 $ by: $Author: danny $
+ * This is $Revision: 1.11 $
+ * Committed on $Date: 2001/11/29 18:17:33 $ by: $Author: danny $
*/
public class SMTPHandler
extends BaseConnectionHandler
@@ -366,6 +366,9 @@
if (sender.length() == 0) {
//This is the <> case. Let senderAddress == null
} else {
+ if(sender.indexOf("@")<0){
+ sender = sender+"@localhost";
+ }
try {
senderAddress = new MailAddress(sender);
} catch (Exception pe) {
@@ -402,6 +405,9 @@
MailAddress recipientAddress = null;
//Remove < and >
recipient = recipient.substring(1, recipient.length() - 1);
+ if(recipient.indexOf("@")<0){
+ recipient = recipient+"@localhost";
+ }
try {
recipientAddress = new MailAddress(recipient);
} catch (Exception pe) {
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>