Page MenuHomePhorge

Sending mail without SSL in Syncroton
Closed, ResolvedPublic

Description

There's an issue with sending mail through Syncroton, when SSL is disabled;

  • For some reason, the DOM seems to be NULL, which isn't getting handled correctly (see T1052#15103). This matter probably deserves some investigation, and could be split out in a separate ticket if so needed,
  • Syncroton should probably not be attempting to connect to the SMTP / submission server for an email submission attempt it can reasonably know is going to fail,
  • A better error message could be used.

Details

Ticket Type
Task

Event Timeline

The error tells us that the activesync request body is missing or syncroton faild to parse it.
So, to track this down we'd need to know what exactly was sent by the device.

Normal text (just tried by just putting "Test" as subject and "Test" as content).

I was more interested in the request body on activesync/http protocol level.

I will do my best to provide this, if you tell me how.

Would just putting "test" in the subject and body not mean an empty recipient list though?

Jeroen, the warning on simplexml_import_dom() indicates the problem is on activesync protocol level.

Of course I added my recipients-adress also. Forgot to mention that. Its a normal adress with alphabetical letters and .org ending.

...but I agree that if empty body (for whatever reason) is detected it should not even try to connect to SMTP server.

BTW, iOS 7.1.2 with kolabnow.com account works for me.

Its possible that I made a mistake in my config. Kinda hard to debug.

Reading source code I see only one case when simplexml_import_dom()'s argument can be NULL here. It is when php://input stream is empty. (feof() returns true). https://git.kolab.org/diffusion/S/browse/master/lib/ext/Syncroton/Server.php;e0fb77d4c05c95cc78dc8c9b38517b8a84d5a40e$130. So, the problem may not be in the php code.

The apache access log is telling me:

123.123.123.123 - test@domain.tld [25/Feb/2016:10:42:03 +0100] "POST /Microsoft-Server-ActiveSync?User=test@domain.tld&DeviceId=Applxyz&DeviceType=iPhone&Cmd=SendMail HTTP/1.1" 200 15 "-" "Apple-iPhone3C1/1234.123"
123.123.123.123 - test@domain.tld [25/Feb/2016:10:36:46 +0100] "POST /Microsoft-Server-ActiveSync?User=test@domain.tld&DeviceId=Applxyz&DeviceType=iPhone&Cmd=Ping HTTP/1.1" 200 13 "-" "Apple-iPhone3C1/1234.123"

Got it going!

The problem appears only if "use SSL" is disabled in the iPhones mail-configuration.

With enabled SSL sending works without any problems.

So, looks like client issue. I'll leave this open as a request to handle better such situations, i.e. to not even try to connect to SMTP and return better error.

vanmeeuwen lowered the priority of this task from 60 to 20.Mar 6 2016, 12:08 PM

Updating the ticket to reflect the new semantics.

vanmeeuwen renamed this task from Bug at sending a mail via syncroton to Sending mail without SSL in Syncroton.Mar 6 2016, 12:11 PM
vanmeeuwen assigned this task to machniak.
vanmeeuwen updated the task description. (Show Details)
machniak closed this task as Resolved.
machniak moved this task from Backlog to Done on the Sprint 201610 board.