+1 vote
by (530 points)
edited

Hello,

today I tried to use the connect-method with no tls/ssl parameters (AllowedSuite and AllowedVersion). But we get the exception that at least one of the parameters tls/ssl has to be selected. All I want is to send a mail without any of the parameters above, just an unecrypted mail. I want to allow to decide if I send a mail encrypted or unencrypted by the settings the user has selected.

Any help is kindly appreciated.

Greetings, dirk

by (58.9k points)
edited

Hello,

there is the Connect overload with SslMode parameter, which can be set to None, Explicit or Implicit (None is default).

So to use plain connection you just write:

Smtp smtp = new Smtp();

smtp.Connect("server");

or equivalently you can write:

smtp.Connect("server", SslMode.None);

to specify TLS/SSL in explicit mode, write:

smtp.Connect("server", SslMode.Explicit);

to specify TLS/SSL in implicit mode, write:

smtp.Connect("server", SslMode.Implicit);

2 Answers

0 votes
by (530 points)
edited

Hello Tomáš,

thanks for your answer. I tried your suggestions, but: Unfortunately i get error "Unknown command (500)".. When I add the parameters SSLVersion and Suite to None, I get the error that at least one of the two SSL/TLS [..] must be selected. I get the same error in the sample application you are offering.

Do you have any further ideas?

Thanks, dirk

by (58.9k points)
edited

Hello Dirk,

thank you for clarification. Please create two logs of communication with the SMTP server - one with TLS/SSL enabled and the other with no TLS/SSL enabled (SslMode.None).

Either post the logs here or send it to support@rebex.net. We will be able to see what's going on a hopefully resolve this issue then.

by (530 points)
edited

Hello Tomáš,

thanks for your reply. Unfortunately we cannot use the Rebex.FileLogWriter, our DLL does not offer that class. We have a reference to Rebex.Common and I use Rebex 2003 R2 with .net 4. The product version is 2.0.4981.0 I don't understand why.

Any ideas?

Thanks, dirk

by (58.9k points)
edited

Could you please send us your registered email, or Rebex licence ID to support@rebex.net?

If the build number of your referenced libraries is 4981, the LogWriter property is certainly there:

Smtp client = new Smtp();
client.LogWriter = new Rebex.FileLogWriter(@"c:\temp\log.txt", Rebex.LogLevel.Debug);

Which Rebex dll assemblies are you actually referencing? You should have Rebex.Common.dll, Rebex.Networking.dll and Rebex.Smtp.dll all with the same build number 2014R1.

by (58.9k points)
edited

Where you able to solve this issue? If not, please download a free 30-day trial of Rebex Secure Mail and create the required logs with the latest version with the LogWriter property.

by (530 points)
edited

Hello Tomáš,

please apology my late reply. I checked the details of my dlls and all have the build number 4981. But I am using Rebex 2013 R2 (had a typo above when I wrote 2003) instead of 2014R1. I found the FileLogWriter, I had a namespace problem, sorry. Still, the problem exists: I tried with None (SSLMode: None, TLSVersion:None, TlsCipherSuite: None; build 2013R2) and I get into catch that at least one parameter has to be selected. The log shows:

2014-04-02 15:14:36.983 Opening log file.
2014-04-02 15:14:36.987 Using FileLogWriter version 2.0.4981.0.

2.case: SSLMode: Explicity, TLSVersion:Any, TlsCipherSuite:All:

2014-04-02 15:19:31.416 Opening log file.
2014-04-02 15:19:31.420 Using FileLogWriter version 2.0.4981.0.
2014-04-02 15:19:37.735 INFO Smtp(1)[10] Info: Connecting to mail-10-4:25 using Smtp 2.0.4981.0.
2014-04-02 15:19:37.771 DEBUG Smtp(1)[10] Info: Connection succeeded.
2014-04-02 15:19:37.777 INFO Smtp(1)[10] Response: 220 mail-10-4.ATS-Intranet.local Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at  Wed, 2 Apr 2014 15:19:13 +0200 
2014-04-02 15:19:37.785 INFO Smtp(1)[10] Command: EHLO develop-10-139
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-mail-10-4.ATS-Intranet.local Hello [10.2.1.139]
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-TURN
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-SIZE
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-ETRN
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-PIPELINING
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-DSN
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-ENHANCEDSTATUSCODES
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-8bitmime
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-BINARYMIME
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-CHUNKING
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-VRFY
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-X-EXPS GSSAPI NTLM
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-AUTH GSSAPI NTLM
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-X-LINK2STATE
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250-XEXCH50
2014-04-02 15:19:37.786 INFO Smtp(1)[10] Response: 250 OK
2014-04-02 15:19:37.871 ERROR Smtp(1)[10] Info: Rebex.Net.SmtpException: Explicit TLS/SSL is not supported by the SMTP server.
   bei Rebex.Net.Smtp.LM(TlsParameters A)
   bei Rebex.Net.Smtp.DM(String A, Int32 B, TlsParameters C, SmtpSecurity D)

2014R1 trial version: same problems

I connected with: _smtp.Connect(ServerHost, ServerPort, security); and security saved SSLMode.None i.e.

Do you have any further ideas?

Thanks, dirk

0 votes
by (58.9k points)
edited

UPDATE The fix has been publicly released as a part of version 2014R2.


Hello Dirk,

thank you for additional information. It turned out to be a bug in the component. It should definitely be possible to set TLSVersion.None, TlsCipherSuite.None when SSL/TLS is not used (which is the case with SslMode.None). We are working on this issue and I will send you a hotfix when it is ready.

by (530 points)
edited

Hello Tomáš,

you are very welcome. I have to thank you for all your efforts. Oh okay, I see, I'm glad we could find the issue together and am really looking forward to the hotfix.

Thanks a lot in advance!

Bye, dirk

by (58.9k points)
edited

I am sending the promised hotfix to your registered email address. Please download it and let us know whether the issue is solved now! Thank you much for your cooperation it is much appreciated.

For trial users, here is a trial version of the hotfix.

by (530 points)
edited

Hello Tomáš,

thanks a lot, it does work now! That?s really great...I did need to enter a license trial key in the code, is that OK? Or do you need any additional license information from me? I also did answer your mail.

Thanks, dirk

by (58.9k points)
edited

Hello Dirk,

thanks for letting us know that the hotfix works. It looks like I sent to you the trial version by mistake. Sorry for inconvenience! I have sent a new link to download the full version of the hotfix to you via email, so please change the dll's to the full version and the problem should be resolved.

Kind regards,

Tomas Knopp

by (530 points)
edited

Hello Tomáš,

sorry again for my late reply. I had to test the dlls and occured some problems (as described in my latest mail) but generally the dlls work now, thanks a lot!

bye

by (58.9k points)
edited

Hello Dirk, thank you for confirmation that the hotfix is working fine. The email question seems to be unrelated to the hotfix, so I will get back to you via email only. Tomas

by (58.9k points)
edited

The fix has been publicly released as a part of version 2014R2.

...