1 (edited by daulton 2019-04-02 07:28:05)

Topic: OpenBSD sogo active sync not functioning

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 PGSQL edition
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: OpenBSD 6.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

My issue is that in Sogo everything but ActiveSync is working. I have tried from both my Android phone and Outlook 2013 per the iRedmail documentation and it does not work.

I was reading the sogo documentation and noticed the following:

"To enable Microsoft ActiveSync support in SOGo, you must install the required packages.
yum install sogo-activesync libwbxml"

OpenBSD does not have either of those packages, however per the "Install iRedMail on OpenBSD" installation document it does not mention that ActiveSync does not work on OpenBSD.

I started sogod in debug/verbose mode and got the following output after I tried connecting:

Apr 01 19:13:04 sogod [8086]: <0x0x1f42e987ae08[WOHttpAdaptor]> notified the watchdog that we are ready
Apr 01 19:13:04 sogod [4963]: <0x0x1f42bc518088[WOHttpAdaptor]> notified the watchdog that we are ready
Apr 01 19:17:45 sogod [4963]: |SOGo| starting method 'OPTIONS' on uri '/SOGo/Microsoft-Server-ActiveSync'
Apr 01 19:17:45 sogod [4963]: <0x0x1f4345f0fc08[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Apr 01 19:17:45 sogod [4963]: <0x0x1f4345f0fc08[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
2019-04-01 19:17:45.528 sogod[4963:34372972565384] PG0x0x1f42bc516e08 SQL: SELECT c_password FROM users WHERE c_uid = 'daulton@<my domain name>'
2019-04-01 19:17:47.622 sogod[4963:34372972565384] PostgreSQL72 connection established: <0x0x1f430a39a7a8[PGConnection]:  connection=0x0x1f42e5e9e000>
2019-04-01 19:17:47.624 sogod[4963:34372972565384] PostgreSQL72 channel 0x0x1f4317619308 opened (connection=<0x0x1f430a39a7a8[PGConnection]:  connection=0x0x1f42e5e9e000>)
2019-04-01 19:17:47.626 sogod[4963:34372972565384] PG0x0x1f4317619308 SQL: SELECT * FROM users WHERE (c_uid = 'daulton@<my domain name>') OR (mail = 'daulton@<my domain name>')
Apr 01 19:17:47 sogod [4963]: |SOGo| request took 2.216363 seconds to execute
Apr 01 19:17:47 sogod [4963]: mx.<my domain name> "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 2.256 - - -

Help would be appreciated!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: OpenBSD sogo active sync not functioning

ActiveSync should work on OpenBSD out of box.

A POSSIBLE quick fix: open file /etc/nginx/templates/ssl.tmpl, list 'TLSv1.1' in parameter "ssl_protocols =", then restart Nginx service.

If it doesn't work, I need relevant log for troubleshooting:

*) Which Android OS version are you running? And which app do you use for activesync client?
*) How did you setup the activesync on Android and Outlook?
*) What's the error message you got on Android and Outlook? please show us the original error message.

3 (edited by daulton 2019-04-06 08:52:26)

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

ActiveSync should work on OpenBSD out of box.

A POSSIBLE quick fix: open file /etc/nginx/templates/ssl.tmpl, list 'TLSv1.1' in parameter "ssl_protocols =", then restart Nginx service.

If it doesn't work, I need relevant log for troubleshooting:

*) Which Android OS version are you running? And which app do you use for activesync client?
*) How did you setup the activesync on Android and Outlook?
*) What's the error message you got on Android and Outlook? please show us the original error message.

Hi Zhang,

I tried adding TLSv1.1 as you suggested and then retested Outlook 2013 and it had the same result. I have attached the screenshot for what happens. I have blotted out the mx name and IP address but the result from nslookup is correct, considering the error I thought I would include that and mention its correct.

1) Android 7.1.2 LineageOs with the default Android Mail App
2) I followed the instructions in the documentation for each Android as well as Outlook 2013
3) See attached screenshot for the Outlook 2013 error and as of the Android Mail app the error is: "Couldn't finish: Can't connect to server"

In /var/log/sogo/sogo.log I see the following after each attempt. I verified that on my firewall no request is blocked too.

Apr 05 18:56:16 sogod [23781]: mx.<domain name> "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 1.136 - - -

Post's attachments

client testing Outlook 2013.png
client testing Outlook 2013.png 32.09 kb, 1 downloads since 2019-04-05 

You don't have the permssions to download the attachments of this post.

4

Re: OpenBSD sogo active sync not functioning

- As a testing, try to list "SSLv2 SSLv3 TLSv1.0 TLSv1.1" in Nginx "ssl_protocols =" parameter. Note: this is just a testing, they're all considered as not secure enough.
- Do you have a valid ssl cert for Nginx? Outlook requires (https) server to use a valid cert.
- Try to turn on debug mode in SOGo to figure it out: https://docs.iredmail.org/debug.sogo.html

5

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

- As a testing, try to list "SSLv2 SSLv3 TLSv1.0 TLSv1.1" in Nginx "ssl_protocols =" parameter. Note: this is just a testing, they're all considered as not secure enough.
- Do you have a valid ssl cert for Nginx? Outlook requires (https) server to use a valid cert.
- Try to turn on debug mode in SOGo to figure it out: https://docs.iredmail.org/debug.sogo.html

I added the protocols, restarted nginx and sogod, then tested. Same result so I attached the sogo.log file

By chance have you tested OpenBSD with sogo for Active Sync lately? I have made no change to sogo.conf or the nginx templates that would break something like Active Sync, so I'm just wondering if its just me or a bigger problem, perhaps.

Post's attachments

sogo.log 16.63 kb, 1 downloads since 2019-04-09 

You don't have the permssions to download the attachments of this post.

6

Re: OpenBSD sogo active sync not functioning

Any chance to grab an iPhone for testing?

I sometimes had issue with Android, but iPhone always works well. So it would be great if we can use iPhone for testing to make sure ActiveSync works fine on server side.

7

Re: OpenBSD sogo active sync not functioning

Again, do you use a valid SSL cert for https?

8

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

Any chance to grab an iPhone for testing?

I sometimes had issue with Android, but iPhone always works well. So it would be great if we can use iPhone for testing to make sure ActiveSync works fine on server side.

I do not unfortunately, I will see if any family has an old iPhone I can buy or borrow.

ZhangHuangbin wrote:

Again, do you use a valid SSL cert for https?

Sorry I missed replying to this previously, I do. Its a Lets Encrypt cert issued for mx.<my domain> which the host I point the clients at as well.

9

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

Any chance to grab an iPhone for testing?

I sometimes had issue with Android, but iPhone always works well. So it would be great if we can use iPhone for testing to make sure ActiveSync works fine on server side.

Hi Zhang,

I got an iPhone for testing, its an iPhone 6 running iOS 11.4.1. I enabled debug on sogo and tried and here are the results:

Error on iPhone:

"Exchange account: Unable to verify account information"

Sogo log:

Apr 20 23:00:25 sogod [4790]: <0x0xe7d3587b288[WOHttpAdaptor]> notified the watchdog that we are ready
Apr 20 23:01:24 sogod [4790]: |SOGo| starting method 'OPTIONS' on uri '/SOGo/Microsoft-Server-ActiveSync'
Apr 20 23:01:24 sogod [4790]: <0x0xe7d231c7708[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Apr 20 23:01:24 sogod [4790]: <0x0xe7d231c7708[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
2019-04-20 23:01:25.027 sogod[4790:15927502392072] PG0x0xe7d57583008 SQL: SELECT c_password FROM users WHERE c_uid = 'daulton@my domain.com'
2019-04-20 23:01:26.083 sogod[4790:15927502392072] PG0x0xe7d57583008 SQL: SELECT * FROM users WHERE (c_uid = 'daulton@my domain.com') OR (mail = 'daulton@my domain.com')
Apr 20 23:01:26 sogod [4790]: |SOGo| request took 1.166688 seconds to execute
Apr 20 23:01:26 sogod [4790]: mx.my domain.com "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 1.203 - - -
Apr 20 23:02:36 sogod [4790]: |SOGo| starting method 'OPTIONS' on uri '/SOGo/Microsoft-Server-ActiveSync'
Apr 20 23:02:36 sogod [4790]: |SOGo| request took 0.014061 seconds to execute
Apr 20 23:02:36 sogod [4790]: mx.my domain.com "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 0.027 - - -

10

Re: OpenBSD sogo active sync not functioning

I didn't see any error in pasted log.

11 (edited by daulton 2019-05-03 08:56:06)

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

I didn't see any error in pasted log.

I realize that, its not exactly helpful.

I did a new test which may prove helpful and confusing.

Steps to replicate:
1) I launched a fresh VPS, 1 vcpu and 2 gb RAM, OpenBSD 6.4 same as my production server.
2) I then signed up to iRedMail Easy and input server information for the newly launched VPS.
3) Launched the deployment task on the fresh server, choosing the same setup using OpenBSD 6.4 with the pgsql backend just like my production server
4) On my Android phone I followed the Android EAS iRedMail walk-through and assured to select 'Accept all certificates' as iRedMail was setup default still with self-signed certs
5) I then received the same error as I outlined in a prior post.

sogo log output, debug enabled:

Apr 30 00:02:50 sogod [54897]: |SOGo| starting method 'OPTIONS' on uri '/SOGo/Microsoft-Server-ActiveSync'
Apr 30 00:02:50 sogod [54897]: <0x0x15883e05f708[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Apr 30 00:02:50 sogod [54897]: <0x0x15883e05f708[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
2019-04-30 00:02:50.922 sogod[54897:23674355406984] PG0x0x1588692afd08 SQL: SELECT c_password FROM users WHERE c_uid = 'postmaster@my domain here'
2019-04-30 00:02:50.998 sogod[54897:23674355406984] PG0x0x1588692afd08 SQL: SELECT * FROM users WHERE (c_uid = 'postmaster@my domain here') OR (mail = 'postmaster@my domain here')
Apr 30 00:02:51 sogod [54897]: |SOGo| request took 0.112094 seconds to execute
Apr 30 00:02:51 sogod [54897]: localhost "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 0.131 - - -

Android Mail app the error is: "Couldn't finish: Can't connect to server"

12

Re: OpenBSD sogo active sync not functioning

Default SOGo config file generated by iRedMail should work as expected, since it works fine on Linux out of box.
I didn't see there's any difference of SOGo between OpenBSD and Linux. I have no idea right now. sad

13

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

Default SOGo config file generated by iRedMail should work as expected, since it works fine on Linux out of box.
I didn't see there's any difference of SOGo between OpenBSD and Linux. I have no idea right now. sad

In the meantime while this does not work it would be a good idea perhaps to list this fact on the Downloads page or the OpenBSD iRedMail installation guide? For me personally choosing iRedMail for OpenBSD and sogo with active sync was pretty big for me, I would really like to see this fixed.

14

Re: OpenBSD sogo active sync not functioning

- I would suggest try again with an iOS device.
- Make sure you're running a valid SSL cert for https.

Could you setup a new testing server with valid ssl cert again? i'd like to test it with iPhone and debug via remote ssh access. Let's make it working on OpenBSD.

I don't see any difference of the SOGo package(s) on OpenBSD and Linux, it should work as expected.

15

Re: OpenBSD sogo active sync not functioning

ZhangHuangbin wrote:

- I would suggest try again with an iOS device.
- Make sure you're running a valid SSL cert for https.

Could you setup a new testing server with valid ssl cert again? i'd like to test it with iPhone and debug via remote ssh access. Let's make it working on OpenBSD.

I don't see any difference of the SOGo package(s) on OpenBSD and Linux, it should work as expected.

I sent an email to support@iredmail.org with access details and a link to this thread. The setup is as requested, OpenBSD 6.4 with Postgresql and a valid SSL cert. This isn't my production server or primary domain, just for testing purposes. I left iredmail.tips for you so you know the passwords.

Thank you for working to get this figured out!