james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seyoum tesfay <syumtes...@gmail.com>
Subject Re: SSL/TLS usage with James 3.0-beta4
Date Wed, 13 Feb 2013 11:51:09 GMT
Hi Eric,
I have added another config file called smtpserver-ssl.conf and made
the necessary entries there.The original smtpserver.conf file is for
the plain smtp configuration from my previous working configuration
and is not changed.

After restarting james, I am trying to test it from simple JavaMail
client program with the following properties set:

	final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
        Properties props = System.getProperties();

        props.setProperty("mail.smtp.ssl.enable", "true");
        props.setProperty("mail.smtp.ssl.required", "true");
        props.setProperty("mail.smtp.starttls.enable", "true");
        props.setProperty("mail.smtp.starttls.required", "true");
        props.setProperty("mail.smtp.socketFactory.class", SSL_FACTORY);
        props.setProperty("mail.smtp.socketFactory.port", "465");
        props.setProperty("mail.smtp.socketFactory.fallback", "false");

	props.setProperty("mail.smtp.host", "localhost");	
	//...code for sending mail

But I am getting the following exception after running.

javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 465;
  nested exception is:
        java.net.ConnectException: Connection refused: connect
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
        at javax.mail.Service.connect(Service.java:291)
        at javax.mail.Service.connect(Service.java:172)

I am still quite not sure how to enable ssl/tls with james server and
create client programs for testing SMTPS, POP3S or IMAPS.


On 2/12/13, Eric Charles <eric@apache.org> wrote:
> Hi,
> The logs should not change.
> Are you sure you point your mail client to the ssl socket?
> If you want more logs, raise the SMTP level to DEBUG in log4j.properties.
> Thx, Eric
> On 12/02/2013 14:01, seyoum tesfay wrote:
>> Hi,
>> I am using James 3.0-beta4 and I want to use SSL/TLS for sending and
>> receiving emails with SMTPS, POP3S and IMAPS. I have gone through the
>> james
>> manual on [1] and created the necessary keystore file. I have edited the
>> configuration files to include the <tls socketTLS="false"
>> startTLS="true">
>> entry with appropriate values.
>> After restaring the James server, nothing related to SSL/TLS is
>> happening.
>> For instance, the log during the server startup doesn't show any thing
>> related to SMTPS or so. And I have started to send and read mails and
>> it's
>> just using the plain SMTP and POP3.
>> So, what do I need to do to make sure that I have properly configured
>> SSL/TLS with James server 3.0-beta4?
>> [1]. http://james.apache.org/server/3/config-ssl-tls.html
>> *Seyoum T*.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org


*Seyoum T*.

To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org

View raw message