james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Freeman (JIRA)" <server-...@james.apache.org>
Subject [jira] [Created] (JAMES-1422) Empty MAIL FROM: <> throws javax.mail.internet.AddressException: Out of data at position 1 in '' in string ``'' at position 1
Date Tue, 26 Jun 2012 18:53:44 GMT
Aaron Freeman created JAMES-1422:
------------------------------------

             Summary: Empty MAIL FROM: <> throws javax.mail.internet.AddressException:
Out of data at position 1 in '' in string ``'' at position 1
                 Key: JAMES-1422
                 URL: https://issues.apache.org/jira/browse/JAMES-1422
             Project: JAMES Server
          Issue Type: Bug
          Components: James Core, SMTPServer
    Affects Versions: 3.0-beta4, 3.0-beta5
         Environment: All environments.
            Reporter: Aaron Freeman


James 3.0 is not allowing empty MAIL FROM: <>

It does allow you to enter it, then a RCPT TO and DATA, but after you finish the DATA command
it throws an exception:

ERROR 10:31:12,847 | james.smtpserver | Id='234288323' User='' Invalid email address while
processing DATA.
javax.mail.internet.AddressException: Out of data at position 1 in '' in string ``'' at position
1
        at org.apache.mailet.MailAddress.<init>(MailAddress.java:159)


To reproduce the error (and to test whether you have fixed it), you can copy paste the responses
below:

[root@alpha log]# telnet 10.123.123.123 25 Trying 10.123.123.123...
Connected to alpha.nospam.com (10.123.123.123).
Escape character is '^]'.
220 alpha.nospam.com JAMES SMTP Server Server (JAMES SMTP Server ) ready EHLO testcomputer.com
250-alpha.nospam.com Hello testcomputer.com [10.123.123.123]) 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN
PLAIN 250-PIPELINING 250-ENHANCEDSTATUSCODES
250 8BITMIME
MAIL FROM: <>
250 2.1.0 Sender <> OK
RCPT TO: <aaron@nospam.com>
250 2.1.5 Recipient <aaron@nospam.com> OK DATA
354 Ok Send data ending with <CRLF>.<CRLF>
Subject: Test

Test
.
451 4.0.0 Error processing message: Out of data at position 1 in ''
quit
451 Unable to process request
Connection closed by foreign host.


This is a pretty important issue as its required by RFC1123 5.2.9 to allow empty MAIL FROM
due to bounce emails often using empty MAIL FROM to prevent bounce loops.

As Stefano Bagnara pointed out:

"This is all best summed up by section 5.2.9 of RFC1123, which says:
----
The syntax shown in RFC-821 for the MAIL FROM: command omits the case of an empty path: "MAIL
FROM:<>" (see RFC-821 Page 15). An empty reverse path MUST be supported.
----

So, an empty email address is NOT a valid email address, but an empty email address is valid
in an 
SMTP conversation as a way to say "no mail address".
IIRC James 2.3 dealt with this using null sender in case a <> was received (so to not
build an "invalid" empty address object)."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message