> > <"nlt: Mail Administrator"> > javax.mail.internet.ParseException: Out of data at position 26
Would you please try the following code: if (pos >= address.length() || address.charAt(pos) != '@') { That extra check should cause the correct exception to be thrown. >>> MailAddress sender = new MailAddress( >>> new InternetAddress(message.getFrom()[0].toString())); Check for a Sender: field (RFC 2822, section 3.6.2). If it exists, use it in preference for the envelope. > org.apache.james.pop3mail is a heavily refactored version > of org.apache.james.fetchmail with a bunch of enhancements > and corrections for obscure cases (such as this). I'll fold > it back into fetchmail once I have IMAP in and tested. Cool. > I'ld like your thoughts on my second point regarding how strict James should > be on this. James should adhere to the RFC. Being strict in what you send, lenient in what you accept. If there is some action that Fetchmail can take in a corrective fashion to properly bridge between POP3 and SMTP, that's different from modifying MailAddress to propogate invalid addresses where the RFC prohibits that behavior. The James SMTP handler has the following: if (sender.indexOf("@") < 0) { sender = sender + "@localhost"; } and similar for doRCPT. I won't get into whether or not that is appropriate (Danny said that it is; I still can't find where the RFC allows it), but it does ensure a correct address. > The email in question is the standard welcome email sent by a > major ISP in the UK. Interesting. Ask them about it. I'm curious to know what their postmaster has to say. --- Noel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]