Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 428487

Summary: [server] SMTP gateway settings in orion.conf do not allow STARTTLS
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, ken_walker
Version: 5.0Flags: ken_walker: pmc_approved+
ahunter.eclipse: review? (john.arthorne)
Target Milestone: 6.0 M1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch to fix the issue none

Description Anthony Hunter CLA 2014-02-18 15:17:48 EST
While testing the fix for bug 428386 , I could not get the email notifications to work. The error returned by the Orion server was not helpful.

Two of the the SMTP gateways I was trying to use require SSL/TLS. There is a setting that enables the use of the STARTTLS command to switch the connection to a TLS-protected connection before issuing any login commands. Currently Orion does not support this setting. Without this setting is it impossible to use these SMTP gateways.

mail.smtp.starttls.enable=true

Orion also does not allow debugging of the email connection, I needed this setting to get a clue to what the problem was. On a third SMTP gateway, the error returned was EOF, while the debug stream actually listed the problem being sent from the SMTP gateway. This is another setting we need to add that will help end users debug these SMTP issues.

mail.debug=true

Both of these settings are passed through to the JavaMail API which provides access to an SMTP server that Orion is using.
Comment 1 Anthony Hunter CLA 2014-02-18 15:19:43 EST
Created attachment 240090 [details]
Patch to fix the issue

Attached the code that adds these two settings if the exist in your orion.conf:

mail.smtp.starttls.enable=true
mail.debug=true
Comment 2 Anthony Hunter CLA 2014-02-19 16:47:42 EST
I looked at the code again and in fact the property is there at the top of the method:
		properties.put("mail.smtp.starttls.enable", PreferenceHelper.getString(ServerConstants.CONFIG_MAIL_SMTP_STARTTLS, "true"));


I did not figure out I had to specify mail.smtp.starttls.enable until I figured out how to turn on debugging with mail.debug.

So the real bug here is that you cannot debug rather than you cannot specify STARTTLS.

This is not unnecessarily a must fix for 5.0, although this fix is minor and a lifesaver if trying to debug using the orion binary.
Comment 3 Anthony Hunter CLA 2014-03-03 11:25:16 EST
I have updated the reference web-ide.conf with the settings that were missing:
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ea4315e4844f81b82cc9d3d6bb449b41e5c0e4d4

I also added the missing setting to the server:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=c14e2e60a6611dd274e9c87dd4fca0b4a47d99a2

I also updated the server administration guide and added the two settings to the email configuration documentation:
https://wiki.eclipse.org/Orion/Server_admin_guide#Email_configuration