1 2 Previous Next 18 Replies Latest reply on Aug 21, 2005 9:58 AM by acoliver Go to original post
      • 15. Re: Mail Relay.

         

        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?

        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.

        • 16. Re: Mail Relay.
          acoliver

          naw, too late we can fix this in M4, its not very serious.

          Additional flag: Then what does AuthRequired do? That was its original purpose... Fine if that has changed but what does it do now exactly?

          • 17. Re: Mail Relay.

             

            Then what does AuthRequired do?


            I am not too fussed which way we go, but I thought it would be better users administering security: If AuthRequired == true meant you must log in, no exceptions (any relaying settings are ignored). If AuthRequired == false, you don't need to log in, but the relay settings define what you can do.

            Mike.

            • 18. Re: Mail Relay.
              acoliver

              Okay, I guess I'm just saying that if we do that then we ought just have "allow relay" and ditch auth required. It seems redundant.

              1 2 Previous Next