From: mikezzz <nu...@jb...> - 2005-08-20 15:27:01
|
anonymous wrote : Could be I did something wrong in telnet ;-) Sort of. This is the offending piece of code from SMTPSender (401-406): String[] nameValue = headerLine.split(": "); | if (excludeHeaders.get(nameValue[0].toUpperCase()) == null) { | //subject, to, cc, bcc and from set above | message.addHeader(nameValue[0], nameValue[1]); | } Basically if you set a header line without a space between the ':' and the header-text then the SMTPSender chokes on it (split(": ") returns an array with a single value). Looking at RFC 2822 it doesn't seem to specify that there needs to be a space between the ':' and the field text. I tested with Evolution and it choked on those mails also. I checked on the history and this code has been there for a while (I'm not sure that it ever worked, maybe some mail clients add spaces in there). I have tested with changing the code to 'split(":")' and it works ok. Would you like me to commit this to the M3 branch? anonymous wrote : Actually I think this is in the Auth routines... I put the relaying logic in the RCTPHandler, however the auth method is called first and will fail if auth returns false. All we need to do is swap it round. However I would like to leave it as is and add an additional flag to allow a system to be an open relay. I.e. make it an explicit option for administrators. Cheers, Mike. Mike. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890907#3890907 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890907 |