Hi Eric,
Thank you for the info. I thought we can rename the config files as we
pleased. But james actually doesn't read the smtpserver-ssl.conf. So, I
have made entries for the SSL/TLS in the smtpserver.conf as follows
<bind>0.0.0.0:465</bind>
<connectionBacklog>200</connectionBacklog>
<tls socketTLS="false" startTLS="true">
<keystore>file://conf/mykey.keystore</keystore>
<secret>mypassword</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
<algorithm>SunX509</algorithm>
</tls>
But now I cann't connect to the SMTP or SMTPS server at all. Still needs
your help on how to properly use SSL/TLS with James.
For just curiosity what do I need to do if I want to add custom config
files (like smtpserver-ssl.con) in james?
*Seyoum T*.
On Wed, Feb 13, 2013 at 3:45 PM, Eric Charles <[email protected]> wrote:
> Sorry, I meant smtpserver.conf for beta4.
> In trunk it is now smtpserver.xml
>
> Thx, Eric
>
>
> On 13/02/2013 12:17, Saibabu Vallurupalli wrote:
>
>> Eric,
>>
>> So, do we need to modify smtpserver-template.conf to smtpserver.xml in
>> beta4?
>> I was under impression we need to rename the file as smtpserver.conf :-(
>>
>> Thanks,
>> Sai
>>
>>
>> On Wed, Feb 13, 2013 at 7:11 AM, Eric Charles <[email protected]> wrote:
>>
>> Hi,
>>>
>>> smtpserver-ssl.conf is not read.
>>> You must put your confis in smtpserver.xml.
>>>
>>> Thx, Eric
>>>
>>>
>>> On 13/02/2013 11:51, seyoum tesfay wrote:
>>>
>>> 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.
>>>>
>>>> Exception
>>>> 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.
>>>>
>>>> regards,
>>>>
>>>> On 2/12/13, Eric Charles <[email protected]> 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<http://james.apache.org/**server/3/config-ssl-tls.html>
>>>>>> <h**ttp://james.apache.org/server/**3/config-ssl-tls.html<http://james.apache.org/server/3/config-ssl-tls.html>
>>>>>> >
>>>>>>
>>>>>>
>>>>>> *Seyoum T*.
>>>>>>
>>>>>>
>>>>>> ------------------------------****----------------------------**--**
>>>>> ---------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.****apache.org<
>>>>> server-user-**[email protected]<[email protected]>
>>>>> >
>>>>> For additional commands, e-mail: [email protected].**
>>>>> **org<server-user-help@james.**apache.org<[email protected]>
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.****apache.org<
>>> server-user-**[email protected]<[email protected]>
>>> >
>>> For additional commands, e-mail: [email protected].****org<
>>> server-user-help@james.**apache.org <[email protected]>>
>>>
>>>
>>>
>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail:
> server-user-unsubscribe@james.**apache.org<[email protected]>
> For additional commands, e-mail:
> [email protected].**org<[email protected]>
>
>