davidmoten / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail
Other
149 stars 40 forks source link

TLS Questions #107

Open tlc opened 1 year ago

tlc commented 1 year ago

Thanks!
Sorry for questions in Issues. Maybe consider it a documentation issue.

davidmoten commented 1 year ago

for TLS see these unit test classes which should cover your questions (not sure about SmartClient though):

https://github.com/davidmoten/subethasmtp/blob/master/src/test/java/org/subethamail/smtp/StartTLSFullTest.java

https://github.com/davidmoten/subethasmtp/blob/master/src/test/java/org/subethamail/smtp/PureSSLTest.java

The above classes start up a server using two TLS methods and send a test message to the server, asserting that the message arrived.

davidmoten commented 1 year ago

Does the SmartClient support TLS? How do I enable this?

I'm not sure, if you find out let us know

Is requireTLS(true) and setting javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword enough to enable TLS in the server or is using startTlsSocketFactory() required?

Again, not sure without writing a new unit test. Let us know if you can. Modifying StartTLSFullTest.java would probably tell you.