Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchange Active Sync #7

Open
ghost opened this issue Dec 13, 2019 · 42 comments
Open

Exchange Active Sync #7

ghost opened this issue Dec 13, 2019 · 42 comments
Labels
bug Something isn't working upstream

Comments

@ghost
Copy link

ghost commented Dec 13, 2019

Hi,
Thanks a lot for this package which works fine !
I have a question about the active sync, i see on this topic on the yunohost forum that you had this function.

How it works and how could i sync my data with my phone or other ?
The url is https://domain.tld/Microsoft-Server-ActiveSync ?

Thanks for your answer.
Best regards

@Josue-T
Copy link

Josue-T commented Dec 13, 2019

Hello,

The url is https://domain.tld/Microsoft-Server-ActiveSync ?

Yes. But I don't have any device to test this, so it was probably never tested. So any feedback of this feature is welcome.

@ghost
Copy link
Author

ghost commented Dec 13, 2019

I test the testing branch on my VPS, SOGo works fine but i can't synchronise via Active Sync.

This is what i do :
url of the server : https://domain.tld/Microsoft-Server-ActiveSync
mail : [email protected]
mdp : my_mdp
Domain\User : [email protected]
Port : 993

I tried many options, but doesn't work for me. Z-push is not necessary ?

Do you need some logs ?

Thx

@Josue-T
Copy link

Josue-T commented Dec 13, 2019

Ok. On which device are you trying this ? Marybe you don't need to specify Microsoft-Server-ActiveSync. Maybe try just https://domain.tld for the URL.

@ghost
Copy link
Author

ghost commented Dec 13, 2019

I tried on my Android device (with full url and the short one) by using Adding a new echange account.

@Josue-T
Copy link

Josue-T commented Feb 22, 2020

Hello,

Sorry for the late answer. Have you any log from your android device (with logcat) and on the server side in /var/log/sogo/sogo.log ?

@floriant29
Copy link

Hi,
does sogo_ynh have the activesync plugin ?
Thanks

@Josue-T
Copy link

Josue-T commented Aug 23, 2020

Hello,

Hi,
does sogo_ynh have the activesync plugin ?
Thanks

What do you mean by plugin ?

@floriant29
Copy link

@Josue-T
Copy link

Josue-T commented Aug 24, 2020

Ok, well, I think that in debian it's natively included as there are no specific package for this in debian.

➜  ~ apt search sogo
En train de trier... Fait
Recherche en texte intégral... Fait
fcitx-module-autoeng-ng/testing,unstable 0.1.1~git20150311-2 amd64
  Fcitx autoeng module for Sogou pinyin

fcitx-module-fullwidthchar-enhance/testing,unstable 0.0~git20150311-3 amd64
  Fcitx fullwidthchar enhance module for Sogou pinyin

fcitx-module-punc-ng/testing,unstable 0.1.1~git20161101-2 amd64
  Fcitx punc module for Sogou pinyin

fusiondirectory-plugin-sogo/unstable,unstable 1.3-3 all
  SOGo plugin for FusionDirectory

fusiondirectory-plugin-sogo-schema/unstable,unstable 1.3-3 all
  LDAP schema for FusionDirectory SOgo plugin

sogo/testing,unstable 4.3.2-1 amd64
  Scalable groupware server

sogo-common/testing,testing,unstable,unstable 4.3.2-1 all
  Scalable groupware server - common files

webext-dav4tbsync/testing,testing,unstable,unstable 1.9-1 all
  Provide CalDAV & CardDAV for TbSync

webext-sogo-connector/testing,testing,unstable,unstable 68.0.1-2 all
  Adds DAV client functionality to Thunderbird

xul-ext-sogo-connector/testing,testing,unstable,unstable 68.0.1-2 all
  Adds DAV client functionality to Thunderbird - Transitional package

@floriant29
Copy link

floriant29 commented Aug 25, 2020

in nginx / sogo.conf I have thé good conf :

For ActiveSync

location /Microsoft-Server-ActiveSync/ {
proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync/;
}

So my Android phone doesn't reconize the URL SOGo/Microsoft-Server-ActiveSync

@floriant29
Copy link

floriant29 commented Aug 25, 2020

Here is my SOGo logs :

2020-08-25 10:57:28.189 sogod[3433:3433] Creating NGLdapConnection instance for bindDN '(null)'
Aug 25 10:57:28 sogod [3433]: <0x0x560d7652f070[NGLdapConnection]> Using ldap_initialize for LDAP URL: ldap://localhost:389
2020-08-25 10:57:28.195 sogod[3433:3433] -[NGLdapConnection _searchAtBaseDN:qualifier:attributes:scope:]: search at base '' filter '(objectClass=*)' for attrs 'subschemaSubentry'
2020-08-25 10:57:28.195 sogod[3433:3433] -[NGLdapConnection _searchAtBaseDN:qualifier:attributes:scope:]: search at base 'cn=Subschema' filter '(objectClass=*)' for attrs 'objectclasses'
2020-08-25 10:57:28.198 sogod[3433:3433] -[NGLdapConnection _searchAtBaseDN:qualifier:attributes:scope:]: search at base 'ou=users,dc=yunohost,dc=org' filter '(|(uid=floriant)(mail=floriant))' for attrs '*'
Aug 25 10:57:28 sogod [3433]: |SOGo| request took 0.010993 seconds to execute
Aug 25 10:57:28 sogod [3433]: 37.165.58.11 "GET /SOGo/Microsoft-Server-ActiveSync/ HTTP/1.0" 200 0/0 0.012 - - 1M
Aug 25 10:57:47 sogod [3433]: |SOGo| starting method 'GET' on uri '/SOGo/Microsoft-Server-ActiveSync/'
Aug 25 10:57:47 sogod [3433]: |SOGo| request took 0.000556 seconds to execute

Normaly SOGo execute POST action after ?

@Josue-T
Copy link

Josue-T commented Aug 25, 2020

I found the issue:

08-25 22:06:32.115 13776 13803 W ResponseProcessCookies: Cookie rejected: "BasicClientCookie[version=0,name=SSOwAuthRedirect,domain=domain.tld,path=/yunohost/sso/,expiry=Thu Jan 01 01:00:00 GMT+01:00 1970]". Illegal path attribute "/yunohost/sso/". Path of origin: "/Microsoft-Server-ActiveSync/"

We weed to disable the cookies in the SSO, but I don't know if it will be possible. Actually I don't think, and in the future if it will be possible.

@floriant29
Copy link

I didn't find your cookies issue in my logs :

Aug 27 12:08:47 sogod [15514]: |SOGo| starting method 'GET' on uri '/SOGo/Microsoft-Server-ActiveSync/'
2020-08-27 12:08:47.452 sogod[15514:15514] Creating NGLdapConnection instance for bindDN '(null)'
Aug 27 12:08:47 sogod [15514]: <0x0x55d3d37b7d60[NGLdapConnection]> Using ldap_initialize for LDAP URL: ldap://localhost:389
2020-08-27 12:08:47.453 sogod[15514:15514] -[NGLdapConnection _searchAtBaseDN:qualifier:attributes:scope:]: search at base 'ou=users,dc=yunohost,dc=org' filter '(|(uid=floriant)(mail=floriant))' for attrs '*'
Aug 27 12:08:47 sogod [15514]: |SOGo| traverse(acquire): SOGo => Microsoft-Server-ActiveSync
Aug 27 12:08:47 sogod [15514]: |SOGo| do traverse name: 'SOGo'
Aug 27 12:08:47 sogod [15514]: |SOGo| do traverse name: 'Microsoft-Server-ActiveSync'
Aug 27 12:08:47 sogod [15514]: |SOGo| set clientObject: <SOGo[0x0x55d3d39b5e10]: name=SOGo>
Aug 27 12:08:47 sogod [15514]: |SOGo| request took 0.003594 seconds to execute
Aug 27 12:08:47 sogod [15514]: <0x0x55d3d3917f90[WOResponse]> Zipping of response disabled
Aug 27 12:08:47 sogod [15514]: localhost "GET /SOGo/Microsoft-Server-ActiveSync/ HTTP/1.0" 200 0/0 0.005 - - 0
Aug 27 12:08:57 sogod [15514]: |SOGo| starting method 'GET' on uri '/SOGo/Microsoft-Server-ActiveSync/'
Aug 27 12:08:57 sogod [15514]: |SOGo| traverse(acquire): SOGo => Microsoft-Server-ActiveSync
Aug 27 12:08:57 sogod [15514]: |SOGo| do traverse name: 'SOGo'
Aug 27 12:08:57 sogod [15514]: |SOGo| do traverse name: 'Microsoft-Server-ActiveSync'
Aug 27 12:08:57 sogod [15514]: |SOGo| set clientObject: <SOGo[0x0x55d3d39b5e10]: name=SOGo>
Aug 27 12:08:57 sogod [15514]: |SOGo| request took 0.000758 seconds to execute
Aug 27 12:08:57 sogod [15514]: <0x0x55d3d37f26d0[WOResponse]> Zipping of response disabled
Aug 27 12:08:57 sogod [15514]: localhost "GET /SOGo/Microsoft-Server-ActiveSync/ HTTP/1.0" 200 0/0 0.001 - - 0

@Josue-T
Copy link

Josue-T commented Aug 27, 2020

It's on the phone with adb logcat

@floriant29
Copy link

floriant29 commented Sep 5, 2020

Hello,

I just saw the answer : YunoHost/SSOwat#161 (comment)

I think I should add auth_header parameter in /etc/ssowat.conf.json but where in this file ?

Thanks

@Josue-T
Copy link

Josue-T commented Sep 10, 2020

Hello,

Firstly this settings is for now not available on the stable version. It's only on development. And secondly I'm really not sure that this setting will fix this issue.

@floriant29
Copy link

Ok
I Can try with thé beta version

@Josue-T
Copy link

Josue-T commented Sep 10, 2020

Well actually it's not a beta. It's just a pull request. To use it you need a development environment.

@theoneandonly-vector
Copy link

@Josue-T hey there, any update on this?
the latest version still won't work for me. How can I install the "development environment"? My setup is a home-use setup with no ciritcal E-Mails.. so I can just use it..

as the other z-push app for yunohost also isn't working I thought maybe I can get it this way (just for Anroid phones, for synch on PC I use caldav/carddav with outlook)

@theoneandonly-vector
Copy link

I just upgraded -> testing branch -> didn't fix it.

@Josue-T
Copy link

Josue-T commented Jan 26, 2021

Well,

I'm working on the implementation of new permission system on this app but is not already released. So it's normal that it change nothing...

@theoneandonly-vector
Copy link

theoneandonly-vector commented Jan 26, 2021

@Josue-T But did you manage to make ActiveSync working? could you tell me what to do to make it work on my setup?
I think your comment tells me that you're not working on this issue, but on another one? I just found your forum entry where you told it should be easy to do so I hoped you figured it out :)

I'm sorry.. I just read the comments again.. and found out that you're creating the fundamentals to make this work..
YunoHost/SSOwat#161
YunoHost/issues#1657
so I just wanted to ask i f you have an estimate on how long it will take :)

@Josue-T
Copy link

Josue-T commented Jan 26, 2021

Hello,

I'm working on the permission system. When this is implemented it might work. And if not we will need to debug more. I pushed a branch with the new permission system that I have written. You can try it but it could be buggy, I haven't tested for now.

@theoneandonly-vector
Copy link

theoneandonly-vector commented Jan 26, 2021

-> the install failed with the following log:

sudo yunohost app install https://github.com/YunoHost-Apps/sogo_ynh/tree/permissions --debug
88   DEBUG initializing base actions map parser for cli
89   DEBUG loading actions map namespace 'yunohost'
101  DEBUG building parser...
110  DEBUG building parser took 0.009s
111  DEBUG acquiring lock...
132  DEBUG lock has been acquired
147  DEBUG loading python module yunohost.app took 0.014s
147  INFO processing action [3343.1]: yunohost.app.install with args={'force': False, 'app': 'https://github.com/YunoHost-Apps/sogo_ynh/tree/permissions', 'args': None, 'label': None, 'no_remove_on_failure': False}
WARNUNG! Das Installieren von Anwendungen von Drittanbietern kann die Integrität und Sicherheit Ihres Systems beeinträchtigen. Sie sollten Sie wahrscheinlich NICHT installieren, es sei denn, Sie wiẞen, was Sie tun. Sind Sie bereit, dieses Risiko einzugehen? [Yes, I understand]: Yes, I understand
11495 DEBUG Wird heruntergeladen…
12680 DEBUG Erledigt
13101 DEBUG Überprüfe notwendige Pakete für sogo...
13107 DEBUG Checking that required services are up and running...
13130 INFO untranslated key 'service_description_nginx' for locale 'de'
13239 INFO untranslated key 'service_description_mysql' for locale 'de'
13257 INFO untranslated key 'service_description_fail2ban' for locale 'de'
13423 DEBUG initialize authenticator 'as-root' with: uri='ldapi://%2Fvar%2Frun%2Fslapd%2Fldapi', base_dn='dc=yunohost,dc=org', user_rdn='gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth'
Wählen Sie die Domäne, auf welcher die Applikation installiert werden soll [domain.tld] (default: domain.tld):
24705 INFO untranslated key 'service_description_dovecot' for locale 'de'
Wählen Sie einen Administrator für diese Applikation [myusername] (default: myusername):
Soll diese Applikation für anonyme Benutzer sichtbar sein? [yes | no] (default: yes):
32198 INFO sogo wird installiert...
32359 DEBUG Nothing to update in LDAP
32359 INFO untranslated key 'permission_updated' for locale 'de'
32359 DEBUG Permission 'sogo.main' updated
32440 INFO untranslated key 'log_permission_url' for locale 'de'
32440 DEBUG Um das Protokoll der Operation 'Update url related to permission 'sogo'' anzuzeigen, verwende  den Befehl 'yunohost log display 20210126-225639-permission_url-sogo'
32659 DEBUG The permission database has been resynchronized
32763 DEBUG Die Konfiguration von SSOwat erstellt
32863 INFO untranslated key 'permission_created' for locale 'de'
32864 DEBUG Permission 'sogo.main' created
32864 INFO untranslated key 'log_permission_create' for locale 'de'
32864 DEBUG Um das Protokoll der Operation 'Create permission 'sogo'' anzuzeigen, verwende  den Befehl 'yunohost log display 20210126-225639-permission_create-sogo'
32876 DEBUG Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/var/cache/yunohost/from_file/scripts YNH_APP_MANIFEST_VERSION='4.0.7-1~ynh1' YNH_APP_ARG_IS_PUBLIC=1 YNH_STDINFO=/tmp/tmpeNsnBF/stdinfo YNH_APP_INSTANCE_NAME=sogo YNH_APP_ARG_ADMIN=myusername YNH_INTERFACE=cli YNH_APP_ID=sogo YNH_STDRETURN=/tmp/tmpv7kmfj/stdreturn YNH_APP_ARG_DOMAIN=domain.tld BASH_XTRACEFD=7 /bin/bash -x "./install" domain.tld myusername 1 sogo 7>&1'
32888 DEBUG + source ./experimental_helper.sh
32889 DEBUG + source ./_common.sh
32889 DEBUG ++ app=sogo
32889 DEBUG + source /usr/share/yunohost/helpers
32889 DEBUG +++ set +o
32889 DEBUG +++ grep xtrace
32889 DEBUG ++ readonly 'XTRACE_ENABLE=set -o xtrace'
32889 DEBUG ++ XTRACE_ENABLE='set -o xtrace'
32889 DEBUG ++ set +x
32990 DEBUG + ynh_abort_if_errors
32990 DEBUG + set -o errexit
32990 DEBUG + set -o nounset
32990 DEBUG + trap ynh_exit_properly EXIT
32990 DEBUG + ynh_script_progression '--message=Validating installation parameters...'
32990 DEBUG + set +o xtrace
32990 DEBUG + set +o xtrace
32990 DEBUG + echo '! Helper used in legacy mode !'
32991 DEBUG + set +x
32991 DEBUG + echo '[....................] > Validating installation parameters...'
32991 DEBUG + set -o xtrace
32991 DEBUG + domain=domain.tld
32991 DEBUG + admin=myusername
32991 DEBUG + is_public=1
32991 DEBUG + path_url=/SOGo
32991 DEBUG + ynh_webpath_register --app sogo --domain domain.tld --path_url /SOGo
32991 DEBUG + local legacy_args=adp
32991 DEBUG + args_array=([a]=app= [d]=domain= [p]=path_url=)
32992 DEBUG + local -A args_array
32992 DEBUG + local app
32992 DEBUG + local domain
32992 DEBUG + local path_url
32992 DEBUG + ynh_handle_getopts_args --app sogo --domain domain.tld --path_url /SOGo
32992 DEBUG + set +o xtrace
33092 DEBUG + yunohost app register-url sogo domain.tld /SOGo
33093 INFO [....................] > Validating installation parameters...
34295 DEBUG + ynh_script_progression '--message=Finding available ports...'
34295 DEBUG + set +o xtrace
34396 DEBUG + set +o xtrace
34396 INFO [+...................] > Finding available ports...
34396 DEBUG + echo '! Helper used in legacy mode !'
34396 DEBUG + set +x
34396 DEBUG + echo '[+...................] > Finding available ports...'
34396 DEBUG + set -o xtrace
34396 DEBUG ++ ynh_find_port --port 20000
34397 DEBUG ++ local legacy_args=p
34397 DEBUG ++ args_array=([p]=port=)
34397 DEBUG ++ local -A args_array
34397 DEBUG ++ local port
34397 DEBUG ++ ynh_handle_getopts_args --port 20000
34397 DEBUG ++ set +o xtrace
34397 DEBUG ++ test -n 20000
34397 DEBUG ++ ynh_port_available --port=20000
34397 DEBUG ++ local legacy_args=p
34397 DEBUG ++ args_array=([p]=port=)
34397 DEBUG ++ local -A args_array
34398 DEBUG ++ local port
34398 DEBUG ++ ynh_handle_getopts_args --port=20000
34398 DEBUG ++ set +o xtrace
34398 DEBUG ++ ss --numeric --listening --tcp --udp
34398 DEBUG ++ awk '{print$5}'
34398 DEBUG ++ grep --quiet --extended-regexp ':20000$'
34398 DEBUG ++ return 0
34398 DEBUG ++ echo 20000
34398 DEBUG + port=20000
34398 DEBUG ++ ynh_find_port --port 20001
34398 DEBUG ++ local legacy_args=p
34399 DEBUG ++ args_array=([p]=port=)
34399 DEBUG ++ local -A args_array
34399 DEBUG ++ local port
34399 DEBUG ++ ynh_handle_getopts_args --port 20001
34399 DEBUG ++ set +o xtrace
34399 DEBUG ++ test -n 20001
34399 DEBUG ++ ynh_port_available --port=20001
34399 DEBUG ++ local legacy_args=p
34399 DEBUG ++ args_array=([p]=port=)
34399 DEBUG ++ local -A args_array
34399 DEBUG ++ local port
34400 DEBUG ++ ynh_handle_getopts_args --port=20001
34400 DEBUG ++ set +o xtrace
34400 DEBUG ++ ss --numeric --listening --tcp --udp
34400 DEBUG ++ awk '{print$5}'
34400 DEBUG ++ grep --quiet --extended-regexp ':20001$'
34400 DEBUG ++ return 0
34400 DEBUG ++ echo 20001
34400 DEBUG + smtp_port=20001
34400 DEBUG + ynh_script_progression '--message=Storing installation settings...'
34400 DEBUG + set +o xtrace
34501 DEBUG + set +o xtrace
34501 INFO [#+..................] > Storing installation settings...
34501 DEBUG + echo '! Helper used in legacy mode !'
34501 DEBUG + set +x
34501 DEBUG + echo '[#+..................] > Storing installation settings...'
34501 DEBUG + set -o xtrace
34502 DEBUG + ynh_app_setting_set --app sogo --key admin --value myusername
34502 DEBUG + local legacy_args=akv
34502 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
34502 DEBUG + local -A args_array
34502 DEBUG + local app
34502 DEBUG + local key
34502 DEBUG + local value
34502 DEBUG + ynh_handle_getopts_args --app sogo --key admin --value myusername
34502 DEBUG + set +o xtrace
34603 DEBUG + [[ admin =~ (unprotected|protected|skipped)_ ]]
34603 DEBUG + ynh_app_setting set sogo admin myusername
34603 DEBUG + set +o xtrace
34703 DEBUG + ynh_app_setting_set --app sogo --key is_public --value 1
34704 DEBUG + local legacy_args=akv
34704 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
34704 DEBUG + local -A args_array
34704 DEBUG + local app
34704 DEBUG + local key
34704 DEBUG + local value
34704 DEBUG + ynh_handle_getopts_args --app sogo --key is_public --value 1
34704 DEBUG + set +o xtrace
34805 DEBUG + [[ is_public =~ (unprotected|protected|skipped)_ ]]
34805 DEBUG + ynh_app_setting set sogo is_public 1
34805 DEBUG + set +o xtrace
34905 DEBUG + ynh_app_setting_set --app sogo --key smtp_port --value 20001
34906 DEBUG + local legacy_args=akv
34906 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
34906 DEBUG + local -A args_array
34907 DEBUG + local app
34907 DEBUG + local key
34907 DEBUG + local value
34907 DEBUG + ynh_handle_getopts_args --app sogo --key smtp_port --value 20001
34907 DEBUG + set +o xtrace
35108 DEBUG + [[ smtp_port =~ (unprotected|protected|skipped)_ ]]
35109 DEBUG + ynh_app_setting set sogo smtp_port 20001
35109 DEBUG + set +o xtrace
35109 DEBUG + ynh_app_setting_set --app sogo --key web_port --value 20000
35110 DEBUG + local legacy_args=akv
35110 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
35111 DEBUG + local -A args_array
35111 DEBUG + local app
35111 DEBUG + local key
35111 DEBUG + local value
35112 DEBUG + ynh_handle_getopts_args --app sogo --key web_port --value 20000
35112 DEBUG + set +o xtrace
35313 DEBUG + [[ web_port =~ (unprotected|protected|skipped)_ ]]
35313 DEBUG + ynh_app_setting set sogo web_port 20000
35314 DEBUG + set +o xtrace
35314 DEBUG + ynh_script_progression '--message=Installing dependencies...' --weight=7
35314 DEBUG + set +o xtrace
35415 DEBUG + set +o xtrace
35415 DEBUG + echo '! Helper used in legacy mode !'
35415 DEBUG + set +x
35416 DEBUG + echo '[##+++++++...........] > Installing dependencies...'
35416 DEBUG + set -o xtrace
35416 DEBUG + install_dependance
35416 DEBUG + ynh_install_app_dependencies sogo stunnel4 memcached
35416 DEBUG + local 'dependencies=sogo stunnel4 memcached'
35416 DEBUG ++ echo 'sogo stunnel4 memcached'
35416 DEBUG ++ sed 's/\([^\<=\>]\)\ \([^(]\)/\1, \2/g'
35416 DEBUG + dependencies='sogo, stunnel4, memcached'
35417 DEBUG + local 'dependencies=sogo, stunnel4, memcached'
35417 DEBUG + local manifest_path=../manifest.json
35417 DEBUG + '[' '!' -e ../manifest.json ']'
35418 DEBUG ++ cut '--delimiter="' --fields=4
35418 DEBUG ++ grep '\"version\": ' ../manifest.json
35418 DEBUG + local version=4.0.7-1~ynh1
35419 DEBUG + '[' 12 -eq 0 ']'
35419 DEBUG + local dep_app=sogo
35419 DEBUG + [[ sogo, stunnel4, memcached =~ [<=>] ]]
35420 DEBUG + echo sogo, stunnel4, memcached
35420 DEBUG + grep --quiet php
35420 DEBUG + cat
35420 DEBUG + ynh_package_install_from_equivs /tmp/sogo-ynh-deps.control
35421 DEBUG + local controlfile=/tmp/sogo-ynh-deps.control
35421 DEBUG ++ grep '^Package: ' /tmp/sogo-ynh-deps.control
35421 DEBUG ++ cut '--delimiter= ' --fields=2
35422 DEBUG + local pkgname=sogo-ynh-deps
35422 DEBUG ++ grep '^Version: ' /tmp/sogo-ynh-deps.control
35422 DEBUG ++ cut '--delimiter= ' --fields=2
35423 DEBUG + local pkgversion=4.0.7-1~ynh1
35423 DEBUG + [[ -z sogo-ynh-deps ]]
35423 DEBUG + [[ -z 4.0.7-1~ynh1 ]]
35423 DEBUG + ynh_package_update
35424 DEBUG + ynh_apt update
35424 DEBUG + ynh_wait_dpkg_free
35424 DEBUG + local try
35425 DEBUG + set +o xtrace
35725 DEBUG + return 0
35726 INFO [##+++++++...........] > Installing dependencies...
35726 DEBUG + LC_ALL=C
35726 DEBUG + DEBIAN_FRONTEND=noninteractive
35726 DEBUG + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
35826 DEBUG Hit:1 http://ftp.debian.org/debian buster InRelease
35827 DEBUG Hit:2 http://security.debian.org/debian-security buster/updates InRelease
35827 DEBUG Hit:3 http://ftp.debian.org/debian buster-updates InRelease
35827 DEBUG Hit:4 http://forge.yunohost.org/debian buster InRelease
36128 DEBUG Hit:5 http://repo.zabbix.com/zabbix/4.4/debian buster InRelease
37130 DEBUG Reading package lists...
37130 DEBUG ++ mktemp --directory
37130 DEBUG + local TMPDIR=/tmp/tmp.DCw2SYIkLR
37130 DEBUG + echo 10
37130 DEBUG + ynh_wait_dpkg_free
37130 DEBUG + local try
37130 DEBUG + set +o xtrace
37331 DEBUG + return 0
37331 DEBUG + cp /tmp/sogo-ynh-deps.control /tmp/tmp.DCw2SYIkLR/control
37332 DEBUG + cd /tmp/tmp.DCw2SYIkLR
37332 DEBUG + LC_ALL=C
37332 DEBUG + equivs-build ./control
38034 DEBUG + LC_ALL=C
38035 DEBUG + tee ./dpkg_log
38035 DEBUG + dpkg --force-depends --install ./sogo-ynh-deps_4.0.7-1~ynh1_all.deb
38035 DEBUG Selecting previously unselected package sogo-ynh-deps.
38036 DEBUG (Reading database ... 60269 files and directories currently installed.)
38036 DEBUG Preparing to unpack .../sogo-ynh-deps_4.0.7-1~ynh1_all.deb ...
38036 DEBUG Unpacking sogo-ynh-deps (4.0.7-1~ynh1) ...
38137 DEBUG dpkg: sogo-ynh-deps: dependency problems, but configuring anyway as you requested:
38138 DEBUG  sogo-ynh-deps depends on sogo; however:
38139 DEBUG   Package sogo is not installed.
38139 DEBUG  sogo-ynh-deps depends on stunnel4; however:
38140 DEBUG   Package stunnel4 is not installed.
38141 DEBUG
38141 DEBUG Setting up sogo-ynh-deps (4.0.7-1~ynh1) ...
38142 DEBUG + ynh_package_install --fix-broken
38142 DEBUG + ynh_apt --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken
38142 DEBUG + ynh_wait_dpkg_free
38143 DEBUG + local try
38143 DEBUG + set +o xtrace
38344 DEBUG + return 0
38345 DEBUG + LC_ALL=C
38345 DEBUG + DEBIAN_FRONTEND=noninteractive
38345 DEBUG + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold install --fix-broken
38445 DEBUG Reading package lists...
38646 DEBUG Building dependency tree...
38646 DEBUG Reading state information...
38646 DEBUG Correcting dependencies... Done
38747 DEBUG The following additional packages will be installed:
38747 DEBUG   gnustep-base-common gnustep-base-runtime gnustep-common libgnustep-base1.26
38747 DEBUG   liblasso3 libobjc4 libsbjson2.3 libsope1 libxmlsec1 libxmlsec1-openssl sogo
38747 DEBUG   sogo-common stunnel4
38747 DEBUG Suggested packages:
38747 DEBUG   logcheck-database
38747 DEBUG The following NEW packages will be installed:
38748 DEBUG   gnustep-base-common gnustep-base-runtime gnustep-common libgnustep-base1.26
38748 DEBUG   liblasso3 libobjc4 libsbjson2.3 libsope1 libxmlsec1 libxmlsec1-openssl sogo
38748 DEBUG   sogo-common stunnel4
39249 DEBUG 0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
39249 DEBUG Need to get 0 B/26.4 MB of archives.
39249 DEBUG After this operation, 76.4 MB of additional disk space will be used.
39249 DEBUG Selecting previously unselected package stunnel4.
39250 DEBUG (Reading database ... 60273 files and directories currently installed.)
39250 DEBUG Preparing to unpack .../00-stunnel4_3%3a5.50-3_amd64.deb ...
39250 DEBUG Unpacking stunnel4 (3:5.50-3) ...
39350 DEBUG Selecting previously unselected package gnustep-common.
39350 DEBUG Preparing to unpack .../01-gnustep-common_2.7.0-4_amd64.deb ...
39350 DEBUG Unpacking gnustep-common (2.7.0-4) ...
39351 DEBUG Selecting previously unselected package gnustep-base-common.
39351 DEBUG Preparing to unpack .../02-gnustep-base-common_1.26.0-4+deb10u1_all.deb ...
39351 DEBUG Unpacking gnustep-base-common (1.26.0-4+deb10u1) ...
39451 DEBUG Selecting previously unselected package libobjc4:amd64.
39451 DEBUG Preparing to unpack .../03-libobjc4_8.3.0-6_amd64.deb ...
39452 DEBUG Unpacking libobjc4:amd64 (8.3.0-6) ...
39452 DEBUG Selecting previously unselected package libgnustep-base1.26.
39452 DEBUG Preparing to unpack .../04-libgnustep-base1.26_1.26.0-4+deb10u1_amd64.deb ...
39452 DEBUG Unpacking libgnustep-base1.26 (1.26.0-4+deb10u1) ...
39652 DEBUG Selecting previously unselected package gnustep-base-runtime.
39653 DEBUG Preparing to unpack .../05-gnustep-base-runtime_1.26.0-4+deb10u1_amd64.deb ...
39653 DEBUG Unpacking gnustep-base-runtime (1.26.0-4+deb10u1) ...
39653 DEBUG Selecting previously unselected package libxmlsec1:amd64.
39653 DEBUG Preparing to unpack .../06-libxmlsec1_1.2.27-2_amd64.deb ...
39653 DEBUG Unpacking libxmlsec1:amd64 (1.2.27-2) ...
39753 DEBUG Selecting previously unselected package libxmlsec1-openssl:amd64.
39754 DEBUG Preparing to unpack .../07-libxmlsec1-openssl_1.2.27-2_amd64.deb ...
39754 DEBUG Unpacking libxmlsec1-openssl:amd64 (1.2.27-2) ...
39754 DEBUG Selecting previously unselected package liblasso3.
39754 DEBUG Preparing to unpack .../08-liblasso3_2.6.0-2+b2_amd64.deb ...
39754 DEBUG Unpacking liblasso3 (2.6.0-2+b2) ...
39854 DEBUG Selecting previously unselected package libsbjson2.3.
39855 DEBUG Preparing to unpack .../09-libsbjson2.3_2.3.2-4+b1_amd64.deb ...
39855 DEBUG Unpacking libsbjson2.3 (2.3.2-4+b1) ...
39855 DEBUG Selecting previously unselected package libsope1.
39855 DEBUG Preparing to unpack .../10-libsope1_4.0.7-1_amd64.deb ...
39855 DEBUG Unpacking libsope1 (4.0.7-1) ...
40156 DEBUG Selecting previously unselected package sogo-common.
40156 DEBUG Preparing to unpack .../11-sogo-common_4.0.7-1+deb10u1_all.deb ...
40156 DEBUG Unpacking sogo-common (4.0.7-1+deb10u1) ...
41558 DEBUG Selecting previously unselected package sogo.
41559 DEBUG Preparing to unpack .../12-sogo_4.0.7-1+deb10u1_amd64.deb ...
41559 DEBUG Unpacking sogo (4.0.7-1+deb10u1) ...
41759 DEBUG Setting up stunnel4 (3:5.50-3) ...
41960 DEBUG Setting up gnustep-common (2.7.0-4) ...
41960 DEBUG Setting up libobjc4:amd64 (8.3.0-6) ...
41960 DEBUG Setting up sogo-common (4.0.7-1+deb10u1) ...
41960 DEBUG Setting up gnustep-base-common (1.26.0-4+deb10u1) ...
41961 DEBUG Setting up libgnustep-base1.26 (1.26.0-4+deb10u1) ...
41961 DEBUG Setting up libxmlsec1:amd64 (1.2.27-2) ...
41961 DEBUG Setting up libxmlsec1-openssl:amd64 (1.2.27-2) ...
41961 DEBUG Setting up gnustep-base-runtime (1.26.0-4+deb10u1) ...
42161 DEBUG Setting up liblasso3 (2.6.0-2+b2) ...
42163 WARNING Adding system-user for sogo
42163 DEBUG Setting up libsbjson2.3 (2.3.2-4+b1) ...
42163 DEBUG Setting up libsope1 (4.0.7-1) ...
42163 DEBUG Setting up sogo (4.0.7-1+deb10u1) ...
42965 DEBUG Created symlink /etc/systemd/system/multi-user.target.wants/sogo.service -> /lib/systemd/system/sogo.service.
43165 DEBUG Processing triggers for systemd (241-7~deb10u5) ...
43266 DEBUG Processing triggers for man-db (2.8.5-2) ...
43566 DEBUG Processing triggers for libc-bin (2.28-10) ...
43767 DEBUG + [[ -n /tmp/tmp.DCw2SYIkLR ]]
43768 DEBUG /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
43768 DEBUG + rm --recursive --force /tmp/tmp.DCw2SYIkLR
43768 DEBUG + ynh_package_is_installed sogo-ynh-deps
43768 DEBUG + local legacy_args=p
43768 DEBUG + args_array=([p]=package=)
43768 DEBUG + local -A args_array
43768 DEBUG + local package
43768 DEBUG + ynh_handle_getopts_args sogo-ynh-deps
43769 DEBUG + set +o xtrace
43769 DEBUG + echo '! Helper used in legacy mode !'
43769 DEBUG + set +x
43769 DEBUG + ynh_wait_dpkg_free
43769 DEBUG + local try
43769 DEBUG + set +o xtrace
43970 DEBUG + return 0
43970 DEBUG + dpkg-query --show '--showformat=${Status}' sogo-ynh-deps
43970 DEBUG + grep --count 'ok installed'
43970 DEBUG + rm /tmp/sogo-ynh-deps.control
43970 DEBUG + ynh_app_setting_set --app=sogo --key=apt_dependencies '--value=sogo, stunnel4, memcached'
43970 DEBUG + local legacy_args=akv
43970 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
43970 DEBUG + local -A args_array
43971 DEBUG + local app
43971 DEBUG + local key
43971 DEBUG + local value
43971 DEBUG + ynh_handle_getopts_args --app=sogo --key=apt_dependencies '--value=sogo, stunnel4, memcached'
43971 DEBUG + set +o xtrace
43971 DEBUG + [[ apt_dependencies =~ (unprotected|protected|skipped)_ ]]
43971 DEBUG + ynh_app_setting set sogo apt_dependencies 'sogo, stunnel4, memcached'
43971 DEBUG + set +o xtrace
44072 DEBUG + ynh_script_progression '--message=Configuring MySQL database...'
44072 DEBUG + set +o xtrace
44072 DEBUG + set +o xtrace
44172 DEBUG + echo '! Helper used in legacy mode !'
44172 INFO [#########+..........] > Configuring MySQL database...
44173 DEBUG + set +x
44173 DEBUG + echo '[#########+..........] > Configuring MySQL database...'
44173 DEBUG + set -o xtrace
44173 DEBUG ++ ynh_sanitize_dbid sogo
44173 DEBUG ++ local legacy_args=n
44173 DEBUG ++ args_array=([n]=db_name=)
44173 DEBUG ++ local -A args_array
44173 DEBUG ++ local db_name
44173 DEBUG ++ ynh_handle_getopts_args sogo
44173 DEBUG ++ set +o xtrace
44173 DEBUG ++ echo '! Helper used in legacy mode !'
44174 DEBUG ++ set +x
44174 DEBUG ++ echo sogo
44174 DEBUG + db_name=sogo
44174 DEBUG + db_user=sogo
44174 DEBUG + ynh_app_setting_set --app sogo --key db_name --value sogo
44174 DEBUG + local legacy_args=akv
44174 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
44174 DEBUG + local -A args_array
44174 DEBUG + local app
44174 DEBUG + local key
44174 DEBUG + local value
44175 DEBUG + ynh_handle_getopts_args --app sogo --key db_name --value sogo
44175 DEBUG + set +o xtrace
44275 DEBUG + [[ db_name =~ (unprotected|protected|skipped)_ ]]
44275 DEBUG + ynh_app_setting set sogo db_name sogo
44275 DEBUG + set +o xtrace
44376 DEBUG + ynh_app_setting_set --app sogo --key db_user --value sogo
44376 DEBUG + local legacy_args=akv
44376 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
44376 DEBUG + local -A args_array
44376 DEBUG + local app
44376 DEBUG + local key
44376 DEBUG + local value
44377 DEBUG + ynh_handle_getopts_args --app sogo --key db_user --value sogo
44377 DEBUG + set +o xtrace
44377 DEBUG + [[ db_user =~ (unprotected|protected|skipped)_ ]]
44377 DEBUG + ynh_app_setting set sogo db_user sogo
44377 DEBUG + set +o xtrace
44477 DEBUG + ynh_mysql_setup_db --db_name sogo --db_user sogo
44478 DEBUG + local legacy_args=unp
44478 DEBUG + args_array=([u]=db_user= [n]=db_name= [p]=db_pwd=)
44478 DEBUG + local -A args_array
44478 DEBUG + local db_user
44478 DEBUG + local db_name
44478 DEBUG + db_pwd=
44478 DEBUG + ynh_handle_getopts_args --db_name sogo --db_user sogo
44478 DEBUG + set +o xtrace
44579 DEBUG ++ ynh_string_random
44579 DEBUG ++ local legacy_args=l
44579 DEBUG ++ args_array=([l]=length=)
44579 DEBUG ++ local -A args_array
44579 DEBUG ++ local length
44579 DEBUG ++ ynh_handle_getopts_args
44579 DEBUG ++ set +o xtrace
44580 DEBUG ++ length=24
44580 DEBUG ++ dd if=/dev/urandom bs=1 count=1000
44580 DEBUG ++ tr --complement --delete A-Za-z0-9
44580 DEBUG ++ sed --quiet 's/\(.\{24\}\).*/\1/p'
44580 DEBUG + local new_db_pwd=IpZqV1OzvMdGt8xDnCYHZT7D
44580 DEBUG + db_pwd=IpZqV1OzvMdGt8xDnCYHZT7D
44580 DEBUG + ynh_mysql_create_db sogo sogo IpZqV1OzvMdGt8xDnCYHZT7D
44580 DEBUG + local db=sogo
44580 DEBUG + local 'sql=CREATE DATABASE sogo;'
44580 DEBUG + [[ 3 -gt 1 ]]
44580 DEBUG + sql+=' GRANT ALL PRIVILEGES ON sogo.* TO '\''sogo'\''@'\''localhost'\'''
44581 DEBUG + [[ -n IpZqV1OzvMdGt8xDnCYHZT7D ]]
44581 DEBUG + sql+=' IDENTIFIED BY '\''IpZqV1OzvMdGt8xDnCYHZT7D'\'''
44581 DEBUG + sql+=' WITH GRANT OPTION;'
44581 DEBUG + ynh_mysql_execute_as_root '--sql=CREATE DATABASE sogo; GRANT ALL PRIVILEGES ON sogo.* TO '\''sogo'\''@'\''localhost'\'' IDENTIFIED BY '\''IpZqV1OzvMdGt8xDnCYHZT7D'\'' WITH GRANT OPTION;'
44581 DEBUG + local legacy_args=sd
44581 DEBUG + args_array=([s]=sql= [d]=database=)
44581 DEBUG + local -A args_array
44581 DEBUG + local sql
44581 DEBUG + local database
44581 DEBUG + ynh_handle_getopts_args '--sql=CREATE DATABASE sogo; GRANT ALL PRIVILEGES ON sogo.* TO '\''sogo'\''@'\''localhost'\'' IDENTIFIED BY '\''IpZqV1OzvMdGt8xDnCYHZT7D'\'' WITH GRANT OPTION;'
44582 DEBUG + set +o xtrace
44582 DEBUG + database=
44582 DEBUG + '[' -n '' ']'
44582 DEBUG ++ cat /etc/yunohost/mysql
44582 DEBUG + ynh_mysql_connect_as --user=root --password=qTLwcOMFBE
44582 DEBUG + local legacy_args=upd
44582 DEBUG + args_array=([u]=user= [p]=password= [d]=database=)
44582 DEBUG + local -A args_array
44582 DEBUG + local user
44582 DEBUG + local password
44582 DEBUG + local database
44583 DEBUG + ynh_handle_getopts_args --user=root --password=qTLwcOMFBE
44583 DEBUG + set +o xtrace
44583 DEBUG + database=
44583 DEBUG + mysql --user=root --password=qTLwcOMFBE --batch ''
44583 DEBUG + ynh_app_setting_set --app=sogo --key=mysqlpwd --value=IpZqV1OzvMdGt8xDnCYHZT7D
44583 DEBUG + local legacy_args=akv
44583 DEBUG + args_array=([a]=app= [k]=key= [v]=value=)
44583 DEBUG + local -A args_array
44583 DEBUG + local app
44583 DEBUG + local key
44583 DEBUG + local value
44584 DEBUG + ynh_handle_getopts_args --app=sogo --key=mysqlpwd --value=IpZqV1OzvMdGt8xDnCYHZT7D
44584 DEBUG + set +o xtrace
44684 DEBUG + [[ mysqlpwd =~ (unprotected|protected|skipped)_ ]]
44684 DEBUG + ynh_app_setting set sogo mysqlpwd IpZqV1OzvMdGt8xDnCYHZT7D
44684 DEBUG + set +o xtrace
44785 DEBUG + ynh_script_progression '--message=Configuring application...' --weight=3
44785 DEBUG + set +o xtrace
44785 DEBUG + set +o xtrace
44785 DEBUG + echo '! Helper used in legacy mode !'
44785 DEBUG + set +x
44785 DEBUG + echo '[##########++........] > Configuring application...'
44786 DEBUG + set -o xtrace
44786 DEBUG + mkdir -p /etc/sogo
44786 DEBUG + ynh_add_config --template=sogo.conf --destination=/etc/sogo/sogo.conf
44786 DEBUG + local legacy_args=tdv
44786 DEBUG + args_array=([t]=template= [d]=destination=)
44786 DEBUG + local -A args_array
44786 DEBUG + local template
44786 DEBUG + local destination
44786 DEBUG + ynh_handle_getopts_args --template=sogo.conf --destination=/etc/sogo/sogo.conf
44786 DEBUG + set +o xtrace
44887 DEBUG + local template_path
44887 INFO [##########++........] > Configuring application...
44887 DEBUG + '[' -f ../conf/sogo.conf ']'
44887 DEBUG + template_path=../conf/sogo.conf
44887 DEBUG + ynh_backup_if_checksum_is_different --file=/etc/sogo/sogo.conf
44887 DEBUG + local legacy_args=f
44888 DEBUG + args_array=([f]=file=)
44888 DEBUG + local -A args_array
44888 DEBUG + local file
44888 DEBUG + ynh_handle_getopts_args --file=/etc/sogo/sogo.conf
44888 DEBUG + set +o xtrace
44888 DEBUG + local checksum_setting_name=checksum__etc_sogo_sogo.conf
44888 DEBUG ++ ynh_app_setting_get --app=sogo --key=checksum__etc_sogo_sogo.conf
44888 DEBUG ++ local legacy_args=ak
44888 DEBUG ++ args_array=([a]=app= [k]=key=)
44888 DEBUG ++ local -A args_array
44888 DEBUG ++ local app
44889 DEBUG ++ local key
44889 DEBUG ++ ynh_handle_getopts_args --app=sogo --key=checksum__etc_sogo_sogo.conf
44889 DEBUG ++ set +o xtrace
44889 DEBUG ++ [[ checksum__etc_sogo_sogo.conf =~ (unprotected|protected|skipped)_ ]]
44889 DEBUG ++ ynh_app_setting get sogo checksum__etc_sogo_sogo.conf
44889 DEBUG ++ set +o xtrace
44989 DEBUG + local checksum_value=
44990 DEBUG + backup_file_checksum=
44990 DEBUG + '[' -n '' ']'
44990 DEBUG + cp ../conf/sogo.conf /etc/sogo/sogo.conf
44990 DEBUG + ynh_replace_vars --file=/etc/sogo/sogo.conf
44990 DEBUG + local legacy_args=f
44990 DEBUG + args_array=([f]=file=)
44990 DEBUG + local -A args_array
44991 DEBUG + local file
44991 DEBUG + ynh_handle_getopts_args --file=/etc/sogo/sogo.conf
44991 DEBUG + set +o xtrace
44991 DEBUG + test -n /SOGo
44991 DEBUG + local path_url_slash_less=/SOGo
44991 DEBUG + ynh_replace_string --match_string=__PATH__/ --replace_string=/SOGo/ --target_file=/etc/sogo/sogo.conf
44991 DEBUG + local legacy_args=mrf
44991 DEBUG + args_array=([m]=match_string= [r]=replace_string= [f]=target_file=)
44991 DEBUG + local -A args_array
44991 DEBUG + local match_string
44992 DEBUG + local replace_string
44992 DEBUG + local target_file
44992 DEBUG + ynh_handle_getopts_args --match_string=__PATH__/ --replace_string=/SOGo/ --target_file=/etc/sogo/sogo.conf
44992 DEBUG + set +o xtrace
45092 DEBUG + local delimit=@
45092 DEBUG + match_string=__PATH__/
45093 DEBUG + replace_string=/SOGo/
45093 DEBUG + sed --in-place s@__PATH__/@/SOGo/@g /etc/sogo/sogo.conf
45093 DEBUG + ynh_replace_string --match_string=__PATH__ --replace_string=/SOGo --target_file=/etc/sogo/sogo.conf
45093 DEBUG + local legacy_args=mrf
45093 DEBUG + args_array=([m]=match_string= [r]=replace_string= [f]=target_file=)
45093 DEBUG + local -A args_array
45093 DEBUG + local match_string
45093 DEBUG + local replace_string
45093 DEBUG + local target_file
45093 DEBUG + ynh_handle_getopts_args --match_string=__PATH__ --replace_string=/SOGo --target_file=/etc/sogo/sogo.conf
45094 DEBUG + set +o xtrace
45094 DEBUG + local delimit=@
45094 DEBUG + match_string=__PATH__
45094 DEBUG + replace_string=/SOGo
45094 DEBUG + sed --in-place s@__PATH__@/SOGo@g /etc/sogo/sogo.conf
45094 DEBUG + test -n sogo
45094 DEBUG + ynh_replace_string --match_string=__NAME__ --replace_string=sogo --target_file=/etc/sogo/sogo.conf
45094 DEBUG + local legacy_args=mrf
45094 DEBUG + args_array=([m]=match_string= [r]=replace_string= [f]=target_file=)
45094 DEBUG + local -A args_array
45094 DEBUG + local match_string
45095 DEBUG + local replace_string
45095 DEBUG + local target_file
45095 DEBUG + ynh_handle_getopts_args --match_string=__NAME__ --replace_string=sogo --target_file=/etc/sogo/sogo.conf
45095 DEBUG + set +o xtrace
45195 DEBUG + local delimit=@
45195 DEBUG + match_string=__NAME__
45196 DEBUG + replace_string=sogo
45196 DEBUG + sed --in-place s@__NAME__@sogo@g /etc/sogo/sogo.conf
45196 DEBUG + ynh_replace_string --match_string=__NAMETOCHANGE__ --replace_string=sogo --target_file=/etc/sogo/sogo.conf
45196 DEBUG + local legacy_args=mrf
45196 DEBUG + args_array=([m]=match_string= [r]=replace_string= [f]=target_file=)
45196 DEBUG + local -A args_array
45196 DEBUG + local match_string
45196 DEBUG + local replace_string
45196 DEBUG + local target_file
45196 DEBUG + ynh_handle_getopts_args --match_string=__NAMETOCHANGE__ --replace_string=sogo --target_file=/etc/sogo/sogo.conf
45197 DEBUG + set +o xtrace
45197 DEBUG + local delimit=@
45197 DEBUG + match_string=__NAMETOCHANGE__
45197 DEBUG + replace_string=sogo
45197 DEBUG + sed --in-place s@__NAMETOCHANGE__@sogo@g /etc/sogo/sogo.conf
45197 DEBUG + ynh_replace_string --match_string=__USER__ --replace_string=sogo --target_file=/etc/sogo/sogo.conf
45197 DEBUG + local legacy_args=mrf
45197 DEBUG + args_array=([m]=match_string= [r]=replace_string= [f]=target_file=)
45197 DEBUG + local -A args_array
45197 DEBUG + local match_string
45197 DEBUG + local replace_string
45198 DEBUG + local target_file
45198 DEBUG + ynh_handle_getopts_args --match_string=__USER__ --replace_string=sogo --target_file=/etc/sogo/sogo.conf
45198 DEBUG + set +o xtrace
45298 DEBUG + local delimit=@
45298 WARNING /usr/share/yunohost/helpers.d/utils: Zeile 402: !one_var ist nicht gesetzt.
45299 DEBUG + match_string=__USER__
45299 DEBUG + replace_string=sogo
45299 DEBUG + sed --in-place s@__USER__@sogo@g /etc/sogo/sogo.conf
45299 DEBUG + test -n ''
45299 DEBUG + test -n 7.3
45299 DEBUG + ynh_replace_string --match_string=__PHPVERSION__ --replace_string=7.3 --target_file=/etc/sogo/sogo.conf
45299 DEBUG + local legacy_args=mrf
45299 DEBUG + args_array=([m]=match_string= [r]=replace_string= [f]=target_file=)
45299 DEBUG + local -A args_array
45300 DEBUG + local match_string
45300 DEBUG + local replace_string
45300 DEBUG + local target_file
45300 DEBUG + ynh_handle_getopts_args --match_string=__PHPVERSION__ --replace_string=7.3 --target_file=/etc/sogo/sogo.conf
45300 DEBUG + set +o xtrace
45300 DEBUG + local delimit=@
45300 DEBUG + match_string=__PHPVERSION__
45300 DEBUG + replace_string=7.3
45300 DEBUG + sed --in-place s@[email protected]@g /etc/sogo/sogo.conf
45301 DEBUG + test -n ''
45301 DEBUG + uniques_vars=($(grep -o '__[A-Z0-9_]*__' $file | sort --unique | sed "s@__\([^.]*\)__@\L\1@g" ))
45301 DEBUG ++ grep -o '__[A-Z0-9_]*__' /etc/sogo/sogo.conf
45301 DEBUG ++ sort --unique
45301 DEBUG ++ sed 's@__\([^.]*\)__@\L\1@g'
45301 DEBUG + local uniques_vars
45301 DEBUG + local delimit=@
45301 DEBUG + for one_var in "${uniques_vars[@]}"
45301 DEBUG + test -n x
45301 DEBUG + match_string=__ADMIN__
45301 DEBUG + match_string=__ADMIN__
45302 DEBUG + replace_string=myusername
45302 DEBUG + replace_string=myusername
45302 DEBUG + sed --in-place s@__ADMIN__@myusername@g /etc/sogo/sogo.conf
45302 DEBUG + for one_var in "${uniques_vars[@]}"
45302 DEBUG + test -n x
45302 DEBUG + match_string=__APP__
45302 DEBUG + match_string=__APP__
45302 DEBUG + replace_string=sogo
45302 DEBUG + replace_string=sogo
45302 DEBUG + sed --in-place s@__APP__@sogo@g /etc/sogo/sogo.conf
45303 DEBUG + for one_var in "${uniques_vars[@]}"
45303 DEBUG + test -n x
45303 DEBUG + match_string=__DB_PASS__
45303 DEBUG + match_string=__DB_PASS__
45303 DEBUG ++ ynh_exit_properly
45303 DEBUG ++ local exit_code=1
45303 DEBUG ++ '[' 1 -eq 0 ']'
45303 DEBUG ++ trap '' EXIT
45303 DEBUG ++ set +o errexit
45303 DEBUG ++ set +o nounset
45304 DEBUG ++ sleep 0.5
45805 DEBUG ++ type -t ynh_clean_setup
45805 DEBUG ++ exit 1
45820 ERROR sogo kann nicht installiert werden: Im Installationsscript ist ein Fehler aufgetreten
45820 INFO Der Vorgang'Installiere die Anwendung 'sogo'' konnte nicht abgeschlossen werden. Bitte teile das vollständige Protokoll dieser Operation mit dem Befehl 'yunohost log display 20210126-225638-app_install-sogo --share', um Hilfe zu erhalten
45832 WARNING Here's an extract of the logs before the crash. It might help debugging the error:
45832 INFO DEBUG - ++ sed 's@__\([^.]*\)__@\L\1@g'
45832 INFO DEBUG - + local delimit=@
45832 INFO DEBUG - + for one_var in "${uniques_vars[@]}"
45833 INFO DEBUG - + test -n x
45833 INFO DEBUG - + match_string=__ADMIN__
45833 INFO DEBUG - + match_string=__ADMIN__
45833 INFO DEBUG - + replace_string=myusername
45833 INFO DEBUG - + replace_string=myusername
45833 INFO DEBUG - + sed --in-place s@__ADMIN__@myusername@g /etc/sogo/sogo.conf
45833 INFO DEBUG - + for one_var in "${uniques_vars[@]}"
45833 INFO DEBUG - + test -n x
45833 INFO DEBUG - + match_string=__APP__
45833 INFO DEBUG - + match_string=__APP__
45833 INFO DEBUG - + replace_string=sogo
45833 INFO DEBUG - + replace_string=sogo
45833 INFO DEBUG - + sed --in-place s@__APP__@sogo@g /etc/sogo/sogo.conf
45833 INFO DEBUG - + for one_var in "${uniques_vars[@]}"
45833 INFO DEBUG - + test -n x
45833 INFO DEBUG - + match_string=__DB_PASS__
45833 INFO DEBUG - + match_string=__DB_PASS__
45833 INFO DEBUG - ++ ynh_exit_properly
45847 WARNING Entfernen der App nach fehlgeschlagener Installation...
45854 DEBUG Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/var/cache/yunohost/from_file/scripts YNH_STDINFO=/tmp/tmpRnE3LA/stdinfo YNH_APP_INSTANCE_NAME=sogo YNH_INTERFACE=cli YNH_APP_ID=sogo YNH_STDRETURN=/tmp/tmp3QlC2N/stdreturn BASH_XTRACEFD=7 /bin/bash -x "./remove" sogo 7>&1'
45863 DEBUG + set -u
45863 DEBUG + source ./experimental_helper.sh
45863 DEBUG + source ./_common.sh
45864 DEBUG ++ app=sogo
45864 DEBUG + source /usr/share/yunohost/helpers
45864 DEBUG +++ set +o
45864 DEBUG +++ grep xtrace
45864 DEBUG ++ readonly 'XTRACE_ENABLE=set -o xtrace'
45864 DEBUG ++ XTRACE_ENABLE='set -o xtrace'
45864 DEBUG ++ set +x
45964 DEBUG + ynh_script_progression '--message=Loading installation settings...'
45965 DEBUG + set +o xtrace
45965 DEBUG + set +o xtrace
45965 DEBUG + echo '! Helper used in legacy mode !'
45965 DEBUG + set +x
45965 DEBUG + echo '[+...................] > Loading installation settings...'
45965 DEBUG + set -o xtrace
45965 DEBUG + app=sogo
45966 DEBUG ++ ynh_app_setting_get --app sogo --key domain
45966 DEBUG ++ local legacy_args=ak
45966 DEBUG ++ args_array=([a]=app= [k]=key=)
45966 DEBUG ++ local -A args_array
45966 DEBUG ++ local app
45966 DEBUG ++ local key
45966 DEBUG ++ ynh_handle_getopts_args --app sogo --key domain
45966 DEBUG ++ set +o xtrace
46067 DEBUG ++ [[ domain =~ (unprotected|protected|skipped)_ ]]
46067 INFO [+...................] > Loading installation settings...
46067 DEBUG ++ ynh_app_setting get sogo domain
46067 DEBUG ++ set +o xtrace
46168 DEBUG + domain=domain.tld
46168 DEBUG ++ ynh_app_setting_get --app sogo --key port
46168 DEBUG ++ local legacy_args=ak
46168 DEBUG ++ args_array=([a]=app= [k]=key=)
46168 DEBUG ++ local -A args_array
46168 DEBUG ++ local app
46168 DEBUG ++ local key
46169 DEBUG ++ ynh_handle_getopts_args --app sogo --key port
46169 DEBUG ++ set +o xtrace
46169 DEBUG ++ [[ port =~ (unprotected|protected|skipped)_ ]]
46169 DEBUG ++ ynh_app_setting get sogo port
46169 DEBUG ++ set +o xtrace
46269 DEBUG + port=
46270 DEBUG ++ ynh_app_setting_get --app sogo --key db_name
46270 DEBUG ++ local legacy_args=ak
46270 DEBUG ++ args_array=([a]=app= [k]=key=)
46270 DEBUG ++ local -A args_array
46270 DEBUG ++ local app
46270 DEBUG ++ local key
46270 DEBUG ++ ynh_handle_getopts_args --app sogo --key db_name
46270 DEBUG ++ set +o xtrace
46270 DEBUG ++ [[ db_name =~ (unprotected|protected|skipped)_ ]]
46270 DEBUG ++ ynh_app_setting get sogo db_name
46271 DEBUG ++ set +o xtrace
46371 DEBUG + db_name=sogo
46371 DEBUG ++ ynh_app_setting_get --app sogo --key db_user
46371 DEBUG ++ local legacy_args=ak
46371 DEBUG ++ args_array=([a]=app= [k]=key=)
46371 DEBUG ++ local -A args_array
46371 DEBUG ++ local app
46372 DEBUG ++ local key
46372 DEBUG ++ ynh_handle_getopts_args --app sogo --key db_user
46372 DEBUG ++ set +o xtrace
46472 DEBUG ++ [[ db_user =~ (unprotected|protected|skipped)_ ]]
46472 DEBUG ++ ynh_app_setting get sogo db_user
46472 DEBUG ++ set +o xtrace
46473 DEBUG + db_user=sogo
46473 DEBUG ++ ynh_app_setting_get --app sogo --key final_path
46473 DEBUG ++ local legacy_args=ak
46473 DEBUG ++ args_array=([a]=app= [k]=key=)
46473 DEBUG ++ local -A args_array
46473 DEBUG ++ local app
46473 DEBUG ++ local key
46473 DEBUG ++ ynh_handle_getopts_args --app sogo --key final_path
46473 DEBUG ++ set +o xtrace
46574 DEBUG ++ [[ final_path =~ (unprotected|protected|skipped)_ ]]
46574 DEBUG ++ ynh_app_setting get sogo final_path
46574 DEBUG ++ set +o xtrace
46674 DEBUG + final_path=
46675 INFO [#+++++++++++++......] > Removing dependencies
46675 DEBUG + ynh_script_progression '--message=Removing dependencies' --weight=10
46675 DEBUG + set +o xtrace
46675 DEBUG + set +o xtrace
46675 DEBUG + echo '! Helper used in legacy mode !'
46675 DEBUG + set +x
46675 DEBUG + echo '[#+++++++++++++......] > Removing dependencies'
46675 DEBUG + set -o xtrace
46675 DEBUG + ynh_remove_app_dependencies
46676 DEBUG + local dep_app=sogo
46676 DEBUG + ynh_package_autopurge sogo-ynh-deps
46676 DEBUG + ynh_apt autoremove --purge sogo-ynh-deps
46676 DEBUG + ynh_wait_dpkg_free
46676 DEBUG + local try
46676 DEBUG + set +o xtrace
46877 DEBUG + return 0
46877 DEBUG + LC_ALL=C
46877 DEBUG + DEBIAN_FRONTEND=noninteractive
46877 DEBUG + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 autoremove --purge sogo-ynh-deps
46977 DEBUG Reading package lists...
47078 DEBUG Building dependency tree...
47079 DEBUG Reading state information...
47179 DEBUG The following packages will be REMOVED:
47180 DEBUG   gnustep-base-common* gnustep-base-runtime* gnustep-common*
47180 DEBUG   libgnustep-base1.26* liblasso3* libobjc4* libsbjson2.3* libsope1*
47180 DEBUG   libxmlsec1* libxmlsec1-openssl* sogo* sogo-common* sogo-ynh-deps* stunnel4*
47581 DEBUG 0 upgraded, 0 newly installed, 14 to remove and 0 not upgraded.
47581 DEBUG After this operation, 76.4 MB disk space will be freed.
47581 DEBUG (Reading database ... 63196 files and directories currently installed.)
47581 DEBUG Removing sogo-ynh-deps (4.0.7-1~ynh1) ...
47682 DEBUG Removing sogo (4.0.7-1+deb10u1) ...
73147 DEBUG Removing libsope1 (4.0.7-1) ...
73148 DEBUG Removing libsbjson2.3 (2.3.2-4+b1) ...
73148 DEBUG Removing gnustep-base-runtime (1.26.0-4+deb10u1) ...
73248 DEBUG Removing libgnustep-base1.26 (1.26.0-4+deb10u1) ...
73248 DEBUG Removing gnustep-base-common (1.26.0-4+deb10u1) ...
73248 DEBUG Removing gnustep-common (2.7.0-4) ...
73249 DEBUG Removing liblasso3 (2.6.0-2+b2) ...
73249 DEBUG Removing libobjc4:amd64 (8.3.0-6) ...
73249 DEBUG Removing libxmlsec1-openssl:amd64 (1.2.27-2) ...
73349 DEBUG Removing libxmlsec1:amd64 (1.2.27-2) ...
73349 DEBUG Removing sogo-common (4.0.7-1+deb10u1) ...
73350 DEBUG Removing stunnel4 (3:5.50-3) ...
73450 DEBUG Processing triggers for man-db (2.8.5-2) ...
73751 DEBUG Processing triggers for libc-bin (2.28-10) ...
73951 DEBUG (Reading database ... 60287 files and directories currently installed.)
73952 DEBUG Purging configuration files for stunnel4 (3:5.50-3) ...
73952 DEBUG You may want to delete the generated stunnel.pem file
73952 DEBUG in /etc/ssl/certs.
74153 DEBUG Purging configuration files for gnustep-common (2.7.0-4) ...
74153 DEBUG dpkg: warning: while removing gnustep-common, directory '/etc/GNUstep' not empty so not removed
74153 DEBUG Purging configuration files for sogo (4.0.7-1+deb10u1) ...
74253 DEBUG Removing user `sogo' ...
74254 DEBUG Warning: group `sogo' has no more members.
74254 DEBUG Done.
74855 DEBUG Purging configuration files for gnustep-base-runtime (1.26.0-4+deb10u1) ...
75056 DEBUG Processing triggers for systemd (241-7~deb10u5) ...
75356 DEBUG + ynh_script_progression '--message=Removing databases...'
75357 DEBUG /bin/bash: BASH_XTRACEFD: 7: invalid value for trace file descriptor
75357 DEBUG + set +o xtrace
75357 DEBUG + set +o xtrace
75357 DEBUG + echo '! Helper used in legacy mode !'
75357 DEBUG + set +x
75357 DEBUG + echo '[##############++....] > Removing databases...'
75357 DEBUG + set -o xtrace
75357 DEBUG + ynh_mysql_remove_db --db_user sogo --db_name sogo
75357 DEBUG + local legacy_args=un
75358 DEBUG + args_array=([u]=db_user= [n]=db_name=)
75358 DEBUG + local -A args_array
75358 DEBUG + local db_user
75358 DEBUG + local db_name
75358 DEBUG + ynh_handle_getopts_args --db_user sogo --db_name sogo
75358 DEBUG + set +o xtrace
75458 DEBUG ++ cat /etc/yunohost/mysql
75459 INFO [##############++....] > Removing databases...
75459 DEBUG + local mysql_root_password=qTLwcOMFBE
75459 DEBUG + mysqlshow --user=root --password=qTLwcOMFBE
75459 DEBUG + grep --quiet '^| sogo'
75459 DEBUG + ynh_mysql_drop_db sogo
75459 DEBUG + ynh_mysql_execute_as_root '--sql=DROP DATABASE sogo;'
75459 DEBUG + local legacy_args=sd
75459 DEBUG + args_array=([s]=sql= [d]=database=)
75459 DEBUG + local -A args_array
75459 DEBUG + local sql
75460 DEBUG + local database
75460 DEBUG + ynh_handle_getopts_args '--sql=DROP DATABASE sogo;'
75460 DEBUG + set +o xtrace
75460 DEBUG + database=
75460 DEBUG + '[' -n '' ']'
75460 DEBUG ++ cat /etc/yunohost/mysql
75460 DEBUG + ynh_mysql_connect_as --user=root --password=qTLwcOMFBE
75460 DEBUG + local legacy_args=upd
75460 DEBUG + args_array=([u]=user= [p]=password= [d]=database=)
75460 DEBUG + local -A args_array
75460 DEBUG + local user
75461 DEBUG + local password
75461 DEBUG + local database
75461 DEBUG + ynh_handle_getopts_args --user=root --password=qTLwcOMFBE
75461 DEBUG + set +o xtrace
75561 DEBUG + database=
75561 DEBUG + mysql --user=root --password=qTLwcOMFBE --batch ''
75562 DEBUG + ynh_mysql_user_exists --user=sogo
75562 DEBUG + local legacy_args=u
75562 DEBUG + args_array=([u]=user=)
75562 DEBUG + local -A args_array
75562 DEBUG + local user
75562 DEBUG + ynh_handle_getopts_args --user=sogo
75562 DEBUG + set +o xtrace
75562 DEBUG ++ ynh_mysql_execute_as_root '--sql=SELECT User from mysql.user WHERE User = '\''sogo'\'';'
75562 DEBUG ++ local legacy_args=sd
75562 DEBUG ++ args_array=([s]=sql= [d]=database=)
75563 DEBUG ++ local -A args_array
75563 DEBUG ++ local sql
75563 DEBUG ++ local database
75563 DEBUG ++ ynh_handle_getopts_args '--sql=SELECT User from mysql.user WHERE User = '\''sogo'\'';'
75563 DEBUG ++ set +o xtrace
75563 DEBUG ++ database=
75563 DEBUG ++ '[' -n '' ']'
75563 DEBUG +++ cat /etc/yunohost/mysql
75563 DEBUG ++ ynh_mysql_connect_as --user=root --password=qTLwcOMFBE
75563 DEBUG ++ local legacy_args=upd
75564 DEBUG ++ args_array=([u]=user= [p]=password= [d]=database=)
75564 DEBUG ++ local -A args_array
75564 DEBUG ++ local user
75564 DEBUG ++ local password
75564 DEBUG ++ local database
75564 DEBUG ++ ynh_handle_getopts_args --user=root --password=qTLwcOMFBE
75564 DEBUG ++ set +o xtrace
75564 DEBUG ++ database=
75564 DEBUG ++ mysql --user=root --password=qTLwcOMFBE --batch ''
75564 DEBUG + [[ -z User
75564 DEBUG sogo ]]
75565 DEBUG + return 0
75565 DEBUG + ynh_mysql_drop_user sogo
75565 DEBUG + ynh_mysql_execute_as_root '--sql=DROP USER '\''sogo'\''@'\''localhost'\'';'
75565 DEBUG + local legacy_args=sd
75565 DEBUG + args_array=([s]=sql= [d]=database=)
75565 DEBUG + local -A args_array
75565 DEBUG + local sql
75565 DEBUG + local database
75565 DEBUG + ynh_handle_getopts_args '--sql=DROP USER '\''sogo'\''@'\''localhost'\'';'
75565 DEBUG + set +o xtrace
75666 DEBUG + database=
75666 DEBUG + '[' -n '' ']'
75666 DEBUG ++ cat /etc/yunohost/mysql
75666 DEBUG + ynh_mysql_connect_as --user=root --password=qTLwcOMFBE
75666 DEBUG + local legacy_args=upd
75666 DEBUG + args_array=([u]=user= [p]=password= [d]=database=)
75667 DEBUG + local -A args_array
75667 DEBUG + local user
75667 DEBUG + local password
75667 DEBUG + local database
75667 DEBUG + ynh_handle_getopts_args --user=root --password=qTLwcOMFBE
75667 DEBUG + set +o xtrace
75667 DEBUG + database=
75667 DEBUG + mysql --user=root --password=qTLwcOMFBE --batch ''
75667 DEBUG + ynh_script_progression '--message=Removing user data...'
75667 DEBUG + set +o xtrace
75668 DEBUG + set +o xtrace
75668 DEBUG + echo '! Helper used in legacy mode !'
75668 DEBUG + set +x
75668 DEBUG + echo '[################+...] > Removing user data...'
75668 DEBUG + set -o xtrace
75668 DEBUG + ynh_secure_remove --file=
75668 DEBUG + local legacy_args=f
75668 DEBUG + args_array=([f]=file=)
75668 DEBUG + local -A args_array
75668 DEBUG + local file
75668 DEBUG + ynh_handle_getopts_args --file=
75669 DEBUG + set +o xtrace
75669 DEBUG + local 'forbidden_path=     /var/www     /home/yunohost.app'
75669 DEBUG + '[' 1 -ge 2 ']'
75669 DEBUG + [[ -z '' ]]
75669 DEBUG + ynh_print_warn '--message=ynh_secure_remove called with empty argument, ignoring.'
75669 DEBUG + local legacy_args=m
75669 DEBUG + args_array=([m]=message=)
75669 DEBUG + local -A args_array
75669 DEBUG + local message
75669 DEBUG + ynh_handle_getopts_args '--message=ynh_secure_remove called with empty argument, ignoring.'
75669 DEBUG + set +o xtrace
75770 DEBUG + ynh_print_log 'ynh_secure_remove called with empty argument, ignoring.'
75770 WARNING ynh_secure_remove called with empty argument, ignoring.
75770 INFO [################+...] > Removing user data...
75770 DEBUG + echo -e 'ynh_secure_remove called with empty argument, ignoring.'
75770 DEBUG + ynh_script_progression '--message=Removing configuration...'
75770 DEBUG + set +o xtrace
75771 DEBUG + set +o xtrace
75771 DEBUG + echo '! Helper used in legacy mode !'
75771 DEBUG + set +x
75771 DEBUG + echo '[#################+..] > Removing configuration...'
75771 DEBUG + set -o xtrace
75771 DEBUG + ynh_secure_remove --file=/etc/sogo
75771 DEBUG + local legacy_args=f
75771 DEBUG + args_array=([f]=file=)
75771 DEBUG + local -A args_array
75771 DEBUG + local file
75771 DEBUG + ynh_handle_getopts_args --file=/etc/sogo
75772 DEBUG + set +o xtrace
75772 DEBUG + local 'forbidden_path=     /var/www     /home/yunohost.app'
75772 DEBUG + '[' 1 -ge 2 ']'
75772 DEBUG + [[ -z /etc/sogo ]]
75772 DEBUG + [[      /var/www     /home/yunohost.app =~ /etc/sogo ]]
75772 DEBUG + [[ /etc/sogo =~ ^/[[:alnum:]]+$ ]]
75772 DEBUG + [[ o = \/ ]]
75772 DEBUG + '[' -e /etc/sogo ']'
75772 DEBUG + ynh_print_info '--message='\''/etc/sogo'\'' wasn'\''t deleted because it doesn'\''t exist.'
75772 DEBUG + local legacy_args=m
75772 DEBUG + args_array=([m]=message=)
75772 DEBUG + local -A args_array
75773 DEBUG + local message
75773 DEBUG + ynh_handle_getopts_args '--message='\''/etc/sogo'\'' wasn'\''t deleted because it doesn'\''t exist.'
75773 DEBUG + set +o xtrace
75773 DEBUG + echo ''\''/etc/sogo'\'' wasn'\''t deleted because it doesn'\''t exist.'
75773 DEBUG + ynh_secure_remove --file=/etc/stunnel/sogo.conf
75773 DEBUG + local legacy_args=f
75773 DEBUG + args_array=([f]=file=)
75773 DEBUG + local -A args_array
75773 DEBUG + local file
75773 DEBUG + ynh_handle_getopts_args --file=/etc/stunnel/sogo.conf
75773 DEBUG + set +o xtrace
75773 DEBUG + local 'forbidden_path=     /var/www     /home/yunohost.app'
75774 DEBUG + '[' 1 -ge 2 ']'
75774 DEBUG + [[ -z /etc/stunnel/sogo.conf ]]
75774 DEBUG + [[      /var/www     /home/yunohost.app =~ /etc/stunnel/sogo\.conf ]]
75774 DEBUG + [[ /etc/stunnel/sogo.conf =~ ^/[[:alnum:]]+$ ]]
75774 DEBUG + [[ f = \/ ]]
75774 DEBUG + '[' -e /etc/stunnel/sogo.conf ']'
75774 DEBUG + ynh_print_info '--message='\''/etc/stunnel/sogo.conf'\'' wasn'\''t deleted because it doesn'\''t exist.'
75774 DEBUG + local legacy_args=m
75774 DEBUG + args_array=([m]=message=)
75774 DEBUG + local -A args_array
75774 DEBUG + local message
75775 DEBUG + ynh_handle_getopts_args '--message='\''/etc/stunnel/sogo.conf'\'' wasn'\''t deleted because it doesn'\''t exist.'
75775 DEBUG + set +o xtrace
75775 DEBUG + echo ''\''/etc/stunnel/sogo.conf'\'' wasn'\''t deleted because it doesn'\''t exist.'
75775 DEBUG + yunohost service remove sogo
75976 DEBUG + ynh_remove_logrotate
75976 WARNING Unbekannter Dienst 'sogo'
75976 INFO [#################+..] > Removing configuration...
75976 DEBUG + '[' -e /etc/logrotate.d/sogo ']'
75976 INFO '/etc/sogo' wasn't deleted because it doesn't exist.
75976 DEBUG + ynh_script_progression '--message=Removal of sogo completed' --last
75977 INFO '/etc/stunnel/sogo.conf' wasn't deleted because it doesn't exist.
75977 DEBUG + set +o xtrace
75977 DEBUG + set +o xtrace
75977 DEBUG + echo '! Helper used in legacy mode !'
75977 DEBUG + set +x
75977 DEBUG + echo '[####################] > Removal of sogo completed'
75977 DEBUG + set -o xtrace
76078 INFO [####################] > Removal of sogo completed
76287 INFO untranslated key 'permission_deleted' for locale 'de'
76287 DEBUG Permission 'sogo.main' deleted
76288 INFO untranslated key 'log_permission_delete' for locale 'de'
76288 DEBUG Um das Protokoll der Operation 'Delete permission 'sogo'' anzuzeigen, verwende  den Befehl 'yunohost log display 20210126-225723-permission_delete-sogo'
76296 DEBUG Checking that required services are up and running...
76320 INFO untranslated key 'service_description_nginx' for locale 'de'
76424 INFO untranslated key 'service_description_mysql' for locale 'de'
76442 INFO untranslated key 'service_description_fail2ban' for locale 'de'
76560 INFO untranslated key 'log_remove_on_failed_install' for locale 'de'
76561 DEBUG Um das Protokoll der Operation 'Remove 'sogo' after a failed installation' anzuzeigen, verwende  den Befehl 'yunohost log display 20210126-225652-remove_on_failed_install-sogo'
76652 DEBUG The permission database has been resynchronized
76753 DEBUG Die Konfiguration von SSOwat erstellt
76764 DEBUG action [3343.1] executed in 76.617s
76764 DEBUG lock has been released

@theoneandonly-vector
Copy link

somehow I don't really find the problem..

do you have an idea on how to find what went wrong?

yunohost log display 20210126-225723-permission_delete-sogo tells me:

/var/log/yunohost/categories/operation# yunohost log display 20210126-225723-permission_delete-sogo
description: Delete permission 'sogo'
log_path: /var/log/yunohost/categories/operation/20210126-225723-permission_delete-sogo.log
logs: 2021-01-26 23:57:23,088: DEBUG - Permission 'sogo.main' deleted
metadata:
  args:
    force: True
    permission: sogo.main
    sync_perm: False
  ended_at: 2021-01-26 23:57:23
  error: None
  interface: cli
  operation: permission_delete
  parent: 20210126-225652-remove_on_failed_install-sogo
  related_to:
    - app
    - sogo
  started_at: 2021-01-26 23:57:23
  success: True
  yunohost_version: 4.1.6
metadata_path: /var/log/yunohost/categories/operation/20210126-225723-permission_delete-sogo.yml
name: 20210126-225723-permission_delete-sogo

@Josue-T
Copy link

Josue-T commented Apr 19, 2021

Maybe this YunoHost/SSOwat#182 might fix the issue.

@baboonandsloth
Copy link

Hi,

I would like to just chime in with: I am also having this issue. I started with z-push but it wouldn't even install on my yunohost, and then found SOGo. I love it, I can get imap with emails to work, but I cannot get activesync/exchange working and that kind of sucks because an exchange setup on Android trumps all setups imo because of the then native calendar and contact sync/setup, the email is a plus.

I have read through everything I can find and cannot make it work

@clicit
Copy link

clicit commented Dec 1, 2022

Maybe this YunoHost/SSOwat#182 might fix the issue.

@Josue-T did that fix the issue? With our current setup ( YH 11.0.10.2, SOGo 5.0.1~ynh1) we still cannot use ActiveSync. Any updates on this? Thanks!

@vsatmydynipnet
Copy link

Good evening, 3 friends of mine setup yunohost and loves it, but now they run into a massive problem that ActiveSync is not working on Sogo/Yunohost. Has anybody found a solution to this problem?

@vsatmydynipnet
Copy link

Test using Windows 11 with Outlook 2016 Pro

SOGO:Domain: sogo.MYDOMAIN.com
Mail Domain: MYDOMAIN.com
User: tester5678
E-Mail: [email protected]
Pass: xxxxxxxxxxx

Trying to setup ActiveSync Account for [email protected] using Exchange in Outlook accesses the main MYDOMAIN.com:

I general looks like the MS is accessing the account using their 52.125.140.0 and not the laptop direct. This can not be in the sense of GDPR???????

52.125.140.0 - - [07/Feb/2023:14:03:04 +0100] "GET /.well-known/autoconfig/mail/config-v1.1.xml HTTP/1.1" 200 668 "-" "-"
52.125.140.0 - - [07/Feb/2023:14:03:05 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 5 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:03:05 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 5 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:03:05 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/1.1" 404 43884 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:03:05 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/1.1" 404 43877 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
LAPTOPIP - - [07/Feb/2023:14:04:18 +0100] "POST /autodiscover/autodiscover.xml HTTP/2.0" 302 0 "-" "Microsoft Office/16.0 (Windows NT 10.0; Microsoft
Outlook 16.0.16026; Pro)"
LAPTOPIP - - [07/Feb/2023:14:04:18 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/2.0" 404 43824 "-" "Microsoft Office/16.0 (Windows NT 10.0; Mic
rosoft Outlook 16.0.16026; Pro)"

This porbably can not work, because Sogo is on sogo.MYDOMAIN.com

Trying to setup ActiveSync Account for [email protected] using Exchange in Outlook accesses the main MYDOMAIN.com:

52.125.140.0 - - [07/Feb/2023:14:09:05 +0100] "GET /.well-known/autoconfig/mail/config-v1.1.xml HTTP/1.1" 200 668 "-" "-"
52.125.140.0 - - [07/Feb/2023:14:09:06 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 5 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:09:06 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 5 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:09:06 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/1.1" 404 43884 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:09:06 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/1.1" 404 43884 "-" "OutlookMobileCloudService-Autodetect/1.0.0"

and also accesses the sogo.MYDOMAIN.com

52.125.140.0 - - [07/Feb/2023:14:09:04 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:09:04 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "OutlookMobileCloudService-Autodetect/1.0.0"
52.125.140.0 - - [07/Feb/2023:14:09:04 +0100] "GET /.well-known/autoconfig/mail/config-v1.1.xml HTTP/1.1" 200 688 "-" "-"
LAPTOPIP - - [07/Feb/2023:14:11:32 +0100] "POST /autodiscover/autodiscover.xml HTTP/2.0" 302 138 "-" "Microsoft Office/16.0 (Windows NT 10.0; Microsof
t Outlook 16.0.16026; Pro)"

The error on Outlook shows is: Something has not worked, Outlook could not setup the account.

If you add the account manually via Account Settings -> Add Account you can set:

Name, E-Mail [email protected], E-Mail Server sogo.MYDOMAIN.com, Username (tried name and email) and Password it accesses sogo.MYDYNIP.com:

LAPTOPIP - [email protected] [07/Feb/2023:14:20:57 +0100] "OPTIONS /Microsoft-Server-ActiveSync HTTP/1.1" 301 162 "-" "Outlook/16.0 (16.0.1
6026.20006; x64)"
LAPTOPIP - [email protected] [07/Feb/2023:14:20:57 +0100] "OPTIONS /Microsoft-Server-ActiveSync/ HTTP/1.1" 302 138 "-" "Outlook/16.0 (16.0.
16026.20006; x64)"

and finally says Server was not found, after these 2 requests.

The Sogo log does not say to much:

Feb 07 12:58:20 sogod [39164]: version 5.0.1 -- starting
Feb 07 12:58:20 sogod [39164]: vmem size check enabled: shutting down app when vmem > 384 MB. Currently at 84 MB
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46a3f20[SOGoProductLoader]> SOGo products loaded from '/usr/lib/GNUstep/SOGo':
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46a3f20[SOGoProductLoader]>   SchedulerUI.SOGo, Appointments.SOGo, Mailer.SOGo, Contacts.SOGo, MailerUI.SOGo, Comm
onUI.SOGo, MainUI.SOGo, AdministrationUI.SOGo, PreferencesUI.SOGo, MailPartViewers.SOGo, ContactsUI.SOGo
Feb 07 12:58:20 sogod [39164]: All products loaded - current memory usage at 92 MB
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46fd840[WOWatchDog]> listening on 127.0.0.1:20000
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46fd840[WOWatchDog]> watchdog process pid: 39164
Feb 07 12:58:20 sogod [39164]: <0x0x7f819a14a360[WOWatchDogChild]> watchdog request timeout set to 10 minutes
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46fd840[WOWatchDog]> preparing 3 children
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46fd840[WOWatchDog]> child spawned with pid 39165
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46fd840[WOWatchDog]> child spawned with pid 39166
Feb 07 12:58:20 sogod [39164]: <0x0x5562c46fd840[WOWatchDog]> child spawned with pid 39167
Feb 07 12:58:20 sogod [39165]: <0x0x5562c47cd240[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 07 12:58:20 sogod [39166]: <0x0x5562c47b58f0[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 07 12:58:20 sogod [39167]: <0x0x5562c47b58f0[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 07 13:20:05 sogod [39167]: <0x0x5562c46582e0[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Feb 07 13:20:05 sogod [39167]: <0x0x5562c46582e0[SOGoCache]> Using host(s) 'localhost' as server(s)

Things breaks kinda early as it looks like.

@Josue-T Josue-T mentioned this issue Feb 9, 2023
2 tasks
@Josue-T
Copy link

Josue-T commented Feb 9, 2023

Hello,

#23 should fix some issue linked to this, @vsatmydynipnet can you check if it fix the problem ?

@vsatmydynipnet
Copy link

I am back at my PC Saturday and be happy to test. I am no dev, so do you have any instructions for me how to apply the patch? I saw the changes in install and upgrade, but unsure how to apply and recreate the URL'S.

Thank you!

@Josue-T
Copy link

Josue-T commented Feb 9, 2023

You can just run this command:

yunohost app upgrade sogo -u https://github.com/YunoHost-Apps/sogo_ynh/tree/fix_permissions

@vsatmydynipnet
Copy link

This is only a note, unsure why this happens, but we had to

touch /etc/stunnel/sogo.conf

to be able to install it.

yunohost app upgrade sogo -u https://github.com/YunoHost-Apps/sogo_ynh/tree/fix_permissions
Info: sogo wird jetzt aktualisiert...
Info: [+...................] > Loading installation settings...
Info: [#+..................] > Backing up the app before upgrading (may take a while)...
Warnung: 685  Source path '/etc/stunnel/sogo.conf' does not exist
Warnung: 2196 Konnte keine Sicherung für sogo erstellen
Warnung: 2213 Keine Änderungen zur Speicherung
Warnung: Backup failed, the upgrade process was aborted.
Fehler: sogo konnte nicht aktualisiert werden: Es ist ein Fehler im App-Upgrade-Skript aufgetreten
Info: Der Vorgang'Upgrade der Applikation 'sogo'' konnte nicht abgeschlossen werden. Bitte teile das vollständige Protokoll dieser Operation mit dem Befehl 'yunohost log share 20230210-123230-app_upgrade-sogo', um Hilfe zu erhalten
Warnung: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - 602  + is_big=0
Info: DEBUG - 603  + not_mandatory=0
Info: DEBUG - 603  + BACKUP_CORE_ONLY=1
Info: DEBUG - 603  + test -n sogo
Info: DEBUG - 603  ++ ynh_app_setting_get --app=sogo --key=do_not_backup_data
Info: DEBUG - 604  ++ local _globalapp=sogo
Info: DEBUG - 630  ++ app=sogo
Info: DEBUG - 630  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
Info: DEBUG - 630  ++ ynh_app_setting get sogo do_not_backup_data
Info: DEBUG - 674  + do_not_backup_data=
Info: DEBUG - 674  + '[' '!' -e /etc/stunnel/sogo.conf ']'
Info: DEBUG - 675  + ynh_print_warn '--message=Source path '\''/etc/stunnel/sogo.conf'\'' does not exist'
Info: DEBUG - 684  + ynh_print_log 'Source path '\''/etc/stunnel/sogo.conf'\'' does not exist'
Info: DEBUG - 684  + echo -e 'Source path '\''/etc/stunnel/sogo.conf'\'' does not exist'
Info: DEBUG - 684  + '[' 0 == 0 ']'
Info: WARNING - 685  Source path '/etc/stunnel/sogo.conf' does not exist
Info: DEBUG - 686  + echo /etc/stunnel/sogo.conf
Info: DEBUG - 686  + grep --quiet /etc/fail2ban
Info: DEBUG - 686  + return 1
Info: DEBUG - 686  + ynh_exit_properly
Fehler: Der Vorgang'Upgrade der Applikation 'sogo'' konnte nicht abgeschlossen werden. Bitte teile das vollständige Protokoll dieser Operation mit dem Befehl 'yunohost log share 20230210-123230-app_upgrade-sogo', um Hilfe zu erhalten

We will test ActiveSync later, but fix is applied now after the touch.

@vsatmydynipnet
Copy link

vsatmydynipnet commented Feb 11, 2023

Test of fix_permissions

yunohost app upgrade sogo -u https://github.com/YunoHost-Apps/sogo_ynh/tree/fix_permissions
Info: sogo wird jetzt aktualisiert...
Info: [+...................] > Loading installation settings...
Info: [#+..................] > Backing up the app before upgrading (may take a while)...
Info: [##++................] > Ensuring downward compatibility...
Info: [####+...............] > Migrating database if needed...
Info: [#####+..............] > Upgrading dependencies...
Info: [######++............] > Configuring application...
Info: [########+...........] > Setuping a cron...
Info: [#########+..........] > Upgrading NGINX web server configuration...
Info: [##########++........] > Protecting directory...
Info: [############+.......] > Configuring permissions...
Warnung: Die Gruppe 'visitors' hat die Berechtigung 'sogo.sync_client' bereits erhalten
Info: [#############+......] > Upgrading logrotate configuration...
Info: [##############++....] > Integrating service in YunoHost...
Info: [################+...] > Starting a systemd service...
Info: [#################+..] > Reloading NGINX web server...
Info: [####################] > Upgrade of sogo completed
Erfolg! sogo aktualisiert
Erfolg! Upgrade vollständig

Created a user

test9876 on domain.tld which is the mail domain, comapared to sogo.domain.tld for sogo.

Trying to login via: https://sogo.domain.tld/SOGo results in:

Feb 11 13:43:22 sogod [185175]: version 5.0.1 -- starting
Feb 11 13:43:22 sogod [185175]: vmem size check enabled: shutting down app when vmem > 384 MB. Currently at 84 MB
Feb 11 13:43:22 sogod [185175]: <0x0x558ba52abf90[SOGoProductLoader]> SOGo products loaded from '/usr/lib/GNUstep/SOGo':
Feb 11 13:43:22 sogod [185175]: <0x0x558ba52abf90[SOGoProductLoader]>   SchedulerUI.SOGo, Appointments.SOGo, Mailer.SOGo, Contacts.SOGo, MailerUI.SOGo, CommonUI.SOGo, M
ainUI.SOGo, AdministrationUI.SOGo, PreferencesUI.SOGo, MailPartViewers.SOGo, ContactsUI.SOGo
Feb 11 13:43:22 sogod [185175]: All products loaded - current memory usage at 92 MB
Feb 11 13:43:22 sogod [185175]: <0x0x558ba53058b0[WOWatchDog]> listening on 127.0.0.1:20000
Feb 11 13:43:22 sogod [185175]: <0x0x558ba53058b0[WOWatchDog]> watchdog process pid: 185175
Feb 11 13:43:22 sogod [185175]: <0x0x7f4be214d360[WOWatchDogChild]> watchdog request timeout set to 10 minutes
Feb 11 13:43:22 sogod [185175]: <0x0x558ba53058b0[WOWatchDog]> preparing 3 children
Feb 11 13:43:22 sogod [185175]: <0x0x558ba53058b0[WOWatchDog]> child spawned with pid 185234
Feb 11 13:43:22 sogod [185175]: <0x0x558ba53058b0[WOWatchDog]> child spawned with pid 185235
Feb 11 13:43:22 sogod [185175]: <0x0x558ba53058b0[WOWatchDog]> child spawned with pid 185237
Feb 11 13:43:22 sogod [185235]: <0x0x558ba53bc1d0[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 13:43:22 sogod [185234]: <0x0x558ba53d2930[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 13:43:22 sogod [185237]: <0x0x558ba53bdfe0[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 13:46:07 sogod [185237]: <0x0x558ba50b80b0[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Feb 11 13:46:07 sogod [185237]: <0x0x558ba50b80b0[SOGoCache]> Using host(s) 'localhost' as server(s)
Feb 11 13:46:07 sogod [185237]: [WARN] <0x0x7f4be216ef60[WOxElemBuilder]> could not locate builders: WOxExtElemBuilder,WOxExtElemBuilder
Feb 11 13:46:07 sogod [185237]: 127.0.0.1 "GET /SOGo/ HTTP/1.0" 200 30599/0 0.103 - - 3M - 12
2023-02-11 13:48:08.232 sogod[185237:185237] EXCEPTION: <NSException: 0x558ba56ffdb0> NAME:NSInvalidArgumentException REASON:SOGoProxyAuthenticator(instance) does not r
ecognize checkLogin:password:domain:perr:expire:grace:useCache: INFO:(null)
Feb 11 13:48:08 sogod [185237]: 127.0.0.1 "POST /SOGo/connect HTTP/1.0" 501 0/69 0.019 - - 0M - 13
2023-02-11 13:48:22.891 sogod[185237:185237] EXCEPTION: <NSException: 0x558ba57e72c0> NAME:NSInvalidArgumentException REASON:SOGoProxyAuthenticator(instance) does not r
ecognize checkLogin:password:domain:perr:expire:grace:useCache: INFO:(null)
Feb 11 13:48:22 sogod [185237]: 127.0.0.1 "POST /SOGo/connect HTTP/1.0" 501 0/87 0.004 - - 0 - 11
2023-02-11 13:49:04.117 sogod[185237:185237] EXCEPTION: <NSException: 0x558ba5821f50> NAME:NSInvalidArgumentException REASON:SOGoProxyAuthenticator(instance) does not r
ecognize checkLogin:password:domain:perr:expire:grace:useCache: INFO:(null)
Feb 11 13:49:04 sogod [185237]: 127.0.0.1 "POST /SOGo/connect HTTP/1.0" 501 0/87 0.003 - - 0 - 11
2023-02-11 13:49:18.251 sogod[185237:185237] EXCEPTION: <NSException: 0x558ba58024f0> NAME:NSInvalidArgumentException REASON:SOGoProxyAuthenticator(instance) does not r
ecognize checkLogin:password:domain:perr:expire:grace:useCache: INFO:(null)
Feb 11 13:49:18 sogod [185237]: 127.0.0.1 "POST /SOGo/connect HTTP/1.0" 501 0/69 0.003 - - 0 - 11

NGInx Log shows the same 501 for /SOGo/connect POST.

Rebooting the server after the update to make sure all is loaded.

OK, now login with test9876 and password via https://sogo.domain.tld/SOGo works and we start testing with Outlook 2016.

##############################################################################

TEST version 1

##############################################################################

  • Windows - Settings - Email - Add Account - ActiveSync

Email Address [email protected]
-->> E-Mail Server: sogo.domain.tld/SOGo
User test9876
Pass password

Continue -> Results in Error

LOGS:

sogo.log:

Feb 11 14:20:22 sogod [1939]: version 5.0.1 -- starting
Feb 11 14:20:22 sogod [1939]: vmem size check enabled: shutting down app when vmem > 384 MB. Currently at 84 MB
Feb 11 14:20:22 sogod [1939]: <0x0x561e20aebf20[SOGoProductLoader]> SOGo products loaded from '/usr/lib/GNUstep/SOGo':
Feb 11 14:20:22 sogod [1939]: <0x0x561e20aebf20[SOGoProductLoader]>   SchedulerUI.SOGo, Appointments.SOGo, Mailer.SOGo, Contacts.SOGo, MailerUI.SOGo, CommonUI.SOGo, MainUI.SO
Go, AdministrationUI.SOGo, PreferencesUI.SOGo, MailPartViewers.SOGo, ContactsUI.SOGo
Feb 11 14:20:22 sogod [1939]: All products loaded - current memory usage at 92 MB
Feb 11 14:20:22 sogod [1939]: <0x0x561e20b45840[WOWatchDog]> listening on 127.0.0.1:20000
Feb 11 14:20:22 sogod [1939]: <0x0x561e20b45840[WOWatchDog]> watchdog process pid: 1939
Feb 11 14:20:22 sogod [1939]: <0x0x7fcd253e5360[WOWatchDogChild]> watchdog request timeout set to 10 minutes
Feb 11 14:20:22 sogod [1939]: <0x0x561e20b45840[WOWatchDog]> preparing 3 children
Feb 11 14:20:22 sogod [1939]: <0x0x561e20b45840[WOWatchDog]> child spawned with pid 1940
Feb 11 14:20:22 sogod [1939]: <0x0x561e20b45840[WOWatchDog]> child spawned with pid 1941
Feb 11 14:20:22 sogod [1939]: <0x0x561e20b45840[WOWatchDog]> child spawned with pid 1942
Feb 11 14:20:22 sogod [1941]: <0x0x561e20c14f20[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 14:20:22 sogod [1940]: <0x0x561e20c158e0[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 14:20:22 sogod [1942]: <0x0x561e20bfc160[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 14:21:37 sogod [1942]: <0x0x561e20947e50[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Feb 11 14:21:37 sogod [1942]: <0x0x561e20947e50[SOGoCache]> Using host(s) 'localhost' as server(s)
Feb 11 14:21:37 sogod [1942]: 127.0.0.1 "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 0.031 - - 1M - 13
Feb 11 14:23:34 sogod [1942]: 127.0.0.1 "PROPFIND /SOGo/dav/support/Contacts/540-6304D180-1-1AA531C0/ HTTP/1.0" 404 70/167 0.020 - - 0 - 13

NGINX

access.log

123.123.123.123 - [email protected] [11/Feb/2023:15:21:37 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:21:37 +0100] "POST /yunohost/admin HTTP/1.1" 301 162 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:21:37 +0100] "POST /yunohost/admin/ HTTP/1.1" 403 146 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - - [11/Feb/2023:15:21:37 +0100] "GET /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "WinHttpRequest"
123.123.123.123 - [email protected] [11/Feb/2023:15:21:37 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:21:37 +0100] "POST /yunohost/admin HTTP/1.1" 301 162 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:21:37 +0100] "POST /yunohost/admin/ HTTP/1.1" 403 146 "-" "Outlook/16.0 (16.0.16026.20006; x64)"

error.log

2023/02/11 15:20:29 [info] 1949#1949: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
2023/02/11 15:21:37 [error] 1964#1964: *21 access forbidden by rule, client: 123.123.123.123, server: , request: "POST /yunohost/admin/ HTTP/1.1", host: "autodiscover.selfhoste
rvps.com"
2023/02/11 15:21:37 [error] 1964#1964: *21 access forbidden by rule, client: 123.123.123.123, server: , request: "POST /yunohost/admin/ HTTP/1.1", host: "autodiscover.selfhoste
rvps.com"

domain.tld-access.log

123.123.123.123 - test9876 [11/Feb/2023:15:21:37 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 5 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - test9876 [11/Feb/2023:15:21:37 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/1.1" 404 43884 "-" "Outlook/16.0 (16.0.16026.20006; x64)"

domain.tld-error.log

2023/02/11 15:21:37 [error] 1964#1964: *15 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on value of type bool in /var/www/wordpress/wp-co
ntent/plugins/remove-footer-credit/remove-footer-credit.php on line 218" while reading response header from upstream, client: 123.123.123.123, server: domain.tld, reques
t: "POST /autodiscover/autodiscover.xml HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm-wordpress.sock:", host: "domain.tld"
2023/02/11 15:21:37 [error] 1964#1964: *15 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on value of type bool in /var/www/wordpress/wp-co
ntent/plugins/remove-footer-credit/remove-footer-credit.php on line 218" while reading response header from upstream, client: 123.123.123.123, server: domain.tld, reques
t: "POST /de/autodiscover/autodiscover.xml HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm-wordpress.sock:", host: "domain.tld"

sogo.domain.tld-access.log

123.123.123.123 - test9876 [11/Feb/2023:15:21:37 +0100] "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.1" 200 0 "-" "Outlook/16.0 (16.0.16026.20006; x64)"

##############################################################################

TEST version 2

##############################################################################

  • Windows - Settings - Email - Add Account - ActiveSync

Email Address [email protected]
-->> E-Mail Server: sogo.domain.tld
User test9876
Pass password

Continue -> Results in Error

LOGS:

sogo.log:

Feb 11 14:32:44 sogod [2185]: version 5.0.1 -- starting
Feb 11 14:32:44 sogod [2185]: vmem size check enabled: shutting down app when vmem > 384 MB. Currently at 84 MB
Feb 11 14:32:44 sogod [2185]: <0x0x564b91216f20[SOGoProductLoader]> SOGo products loaded from '/usr/lib/GNUstep/SOGo':
Feb 11 14:32:44 sogod [2185]: <0x0x564b91216f20[SOGoProductLoader]>   SchedulerUI.SOGo, Appointments.SOGo, Mailer.SOGo, Contacts.SOGo, MailerUI.SOGo, CommonUI.SOGo, MainUI.SO
Go, AdministrationUI.SOGo, PreferencesUI.SOGo, MailPartViewers.SOGo, ContactsUI.SOGo
Feb 11 14:32:44 sogod [2185]: All products loaded - current memory usage at 92 MB
Feb 11 14:32:44 sogod [2185]: <0x0x564b91270840[WOWatchDog]> listening on 127.0.0.1:20000
Feb 11 14:32:44 sogod [2185]: <0x0x564b91270840[WOWatchDog]> watchdog process pid: 2185
Feb 11 14:32:44 sogod [2185]: <0x0x7f832f6c6360[WOWatchDogChild]> watchdog request timeout set to 10 minutes
Feb 11 14:32:44 sogod [2185]: <0x0x564b91270840[WOWatchDog]> preparing 3 children
Feb 11 14:32:44 sogod [2185]: <0x0x564b91270840[WOWatchDog]> child spawned with pid 2186
Feb 11 14:32:44 sogod [2185]: <0x0x564b91270840[WOWatchDog]> child spawned with pid 2187
Feb 11 14:32:44 sogod [2185]: <0x0x564b91270840[WOWatchDog]> child spawned with pid 2188
Feb 11 14:32:44 sogod [2188]: <0x0x564b91327160[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 14:32:44 sogod [2186]: <0x0x564b913408e0[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 14:32:44 sogod [2187]: <0x0x564b9133ff20[WOHttpAdaptor]> notified the watchdog that we are ready
Feb 11 14:33:03 sogod [2187]: <0x0x564b91083f00[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Feb 11 14:33:03 sogod [2187]: <0x0x564b91083f00[SOGoCache]> Using host(s) 'localhost' as server(s)
Feb 11 14:33:03 sogod [2187]: localhost "OPTIONS /SOGo/Microsoft-Server-ActiveSync/ HTTP/1.0" 200 0/0 0.039 - - 2M - 13

access.log

123.123.123.123 - [email protected] [11/Feb/2023:15:33:04 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:33:04 +0100] "POST /yunohost/admin HTTP/1.1" 301 162 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:33:04 +0100] "POST /yunohost/admin/ HTTP/1.1" 403 146 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - - [11/Feb/2023:15:33:04 +0100] "GET /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "WinHttpRequest"
123.123.123.123 - [email protected] [11/Feb/2023:15:33:04 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 138 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:33:04 +0100] "POST /yunohost/admin HTTP/1.1" 301 162 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - [email protected] [11/Feb/2023:15:33:04 +0100] "POST /yunohost/admin/ HTTP/1.1" 403 146 "-" "Outlook/16.0 (16.0.16026.20006; x64)"

error.log

2023/02/11 15:32:48 [info] 2203#2203: Using 131072KiB of shared memory for nchan in /etc/nginx/nginx.conf:61
2023/02/11 15:33:04 [error] 2219#2219: *19 access forbidden by rule, client: 123.123.123.123, server: , request: "POST /yunohost/admin/ HTTP/1.1", host: "autodiscover.selfhoste
rvps.com"
2023/02/11 15:33:04 [error] 2219#2219: *19 access forbidden by rule, client: 123.123.123.123, server: , request: "POST /yunohost/admin/ HTTP/1.1", host: "autodiscover.selfhoste
rvps.com"

domain.tld-access.log

123.123.123.123 - test9876 [11/Feb/2023:15:33:04 +0100] "POST /autodiscover/autodiscover.xml HTTP/1.1" 302 5 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - test9876 [11/Feb/2023:15:33:04 +0100] "POST /de/autodiscover/autodiscover.xml HTTP/1.1" 404 43884 "-" "Outlook/16.0 (16.0.16026.20006; x64)"

domain.tld-error.log

2023/02/11 15:33:04 [error] 2219#2219: *13 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on value of type bool in /var/www/wordpress/wp-co
ntent/plugins/remove-footer-credit/remove-footer-credit.php on line 218" while reading response header from upstream, client: 123.123.123.123, server: domain.tld, reques
t: "POST /autodiscover/autodiscover.xml HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm-wordpress.sock:", host: "domain.tld"
2023/02/11 15:33:04 [error] 2219#2219: *13 FastCGI sent in stderr: "PHP message: PHP Warning:  Trying to access array offset on value of type bool in /var/www/wordpress/wp-co
ntent/plugins/remove-footer-credit/remove-footer-credit.php on line 218" while reading response header from upstream, client: 123.123.123.123, server: domain.tld, reques
t: "POST /de/autodiscover/autodiscover.xml HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm-wordpress.sock:", host: "domain.tld"

sogo.domain.tld-access.log

123.123.123.123 - test9876 [11/Feb/2023:15:33:03 +0100] "OPTIONS /Microsoft-Server-ActiveSync HTTP/1.1" 301 162 "-" "Outlook/16.0 (16.0.16026.20006; x64)"
123.123.123.123 - test9876 [11/Feb/2023:15:33:03 +0100] "OPTIONS /Microsoft-Server-ActiveSync/ HTTP/1.1" 200 0 "-" "Outlook/16.0 (16.0.16026.20006; x64)"

Also the ended in error.

I hope the logs helps to find out whats going wrong.

Thank you for your help!

@vsatmydynipnet
Copy link

Update

To move one step further here we have setup a iredmail server which is using sogo too and tested the functionality. With iredmail ActiveSync works perfect with the above Outlook. I coy the working config files here, maybe somebody has the time to compare them with the Yunohost ones to make ActiveSync working also on Yunohost. I already have red ears from my non-techie friends complaining. :-)

sogo.conf

{
    //
    //  - Official SOGo document: http://sogo.nu/support/index.html#/documentation
    //  - Mailing list: http://sogo.nu/support/index.html#/community
    //

    // Daemon address and port
    WOPort = 127.0.0.1:20000;

    // PID file
    //WOPidFile = /var/run/sogo/sogo.pid;

    // Log file
    //WOLogFile = /var/log/sogo/sogo.log;

    // Enable verbose logging. Reference:
    // http://www.sogo.nu/nc/support/faq/article/how-to-enable-more-verbose-logging-in-sogo.html
    //SOGoDebugRequests = YES;
    //SOGoEASDebugEnabled = YES;
    //ImapDebugEnabled = YES;
    //LDAPDebugEnabled = YES;
    //MySQL4DebugEnabled = YES;
    //PGDebugEnabled = YES;

    // Define the URL to online help for SOGo. When set, an additional icon
    // will appear near the logout button in SOGo's web interface. The URL
    // will always be open in a blank target.
    //SOGoHelpURL = '';

    // set the maximum allowed size for content being sent to SOGo, this can
    // also limit the file attachment size being uploaded to SOGo when
    // composing a mail.
    // The value is in kilobyte. Default is 0 or disabled (unlimit).
    WOMaxUploadSize = 15360;

    // Parameter used to set the maximum allowed email message size when
    // composing a mail.
    // The value is in kilobytes. By default, the value is 0, or disabled so
    // no limit will be set.
    SOGoMaximumMessageSizeLimit = 15360;

    // Performance Tuning
    //
    // The amount of instances of SOGo that will be spawned to handle multiple
    // requests simultaneously. When started from the init script, that amount
    // is overriden by the `PREFORK=` setting in /etc/sysconfig/sogo or
    // /etc/default/sogo. A value of 3 is a reasonable default for low usage.
    // The maximum value depends on the CPU and IO power provided by your
    // machine: a value set too high will actually decrease performances under
    // high load.
    //
    // You should have at least one child per EAS device configured to use
    // "push". You must also have more children than you have EAS devices
    // configured to use "push" - in order to handle normal SOGo requests to
    // its Web or DAV interfaces.
    //
    // Defaults to 1 when unset, increase it if you see below error message in
    // sogo log file: 'No child available to handle incoming request'
    //
    // WARNING:
    //      - on RHEL/CentOS, this setting is controlled by parameter
    //        'PREFORK=' defined in /etc/sysconfig/sogo.
    //      - on Debian/Ubuntu, this setting is controlled by parameter
    //        'PREFORK=' defined in /etc/default/sogo.
    WOWorkersCount = 10;

    // Parameter used to set the maximum amount of time, in seconds, SOGo will
    // wait before replying to a Ping command.
    // If not set, it defaults to 10 seconds.
    SOGoMaximumPingInterval = 3540;

    // Parameter used to set the maximum amount of time, in seconds, SOGo will
    // wait before replying to a Sync command.
    // If not set, it defaults to 30 seconds.
    SOGoMaximumSyncInterval = 3540;

    // Parameter used to set the maximum amount of time, in seconds, SOGo will
    // wait before doing an internal check for data changes (add, delete, and
    // update). This parameter must be lower than SOGoMaximumSyncInterval and
    // SOGoMaximumPingInterval.
    // If not set, it defaults to 10 seconds.
    SOGoInternalSyncInterval = 30;

    // Specifies the number of minutes after which a busy child process will be
    // killed by the parent process.
    // Defaults to 10 (minutes).
    WOWatchDogRequestTimeout = 61;

    // Overwrite the maximum number of items returned during a Sync operation.
    // Defaults to 0, which means no overwrite is performed.
    // Setting this parameter to a value greater than 512 will have unexpected
    // behaviour with various ActiveSync clients.
    //SOGoMaximumSyncWindowSize = 100;

    // Overwrite the maximum response size during a Sync operation.
    // The value is in kilobytes. Setting this to 512 means the response size
    // will be of 524288 bytes or less (or a bit greater if needed for syncing
    // one item). Note that if you set the value too low and a mail message
    // (or any other object like calendar events, tasks and contacts) surpasses
    // it, it will still be synced but only this item will be.
    // Defaults to 0, which means no overwrite is performed.
    //
    // Say you have these five mails and you set the limit to 512KB:
    //  1.  250 KB
    //  2.  250 KB
    //  3.   25 KB
    //  4.  750 KB
    //  5.   10 KB
    // Sync iteration no. 1 will pick message 1, 2 and 3.
    // Sync iteration no. 2 will pick message 4.
    // Sync iteration no. 3 will pick message 5.
    SOGoMaximumSyncResponseSize = 2048;

    // The maximum amount of memory (in megabytes) that a child can use.
    // Reaching that value will force children processes to restart, in order
    // to preserve system memory.
    //
    // Error message when it reaches the value:
    // "terminating app, vMem size limit (xxx MB) has been reached (currently xxx MB)"
    //
    // Defaults to 384.
    SxVMemLimit = 500;

    // Enable XSRF (also known as CSRF) protection.
    SOGoXSRFValidationEnabled = YES;

    // IMAP connection pool.
    // Your performance will slightly increase, as you won't open a new
    // connection for every access to your IMAP server.
    // But you will get a lot of simultaneous open connections to your IMAP
    // server, so make sure he can handle them.
    // For debugging it is reasonable to turn pooling off.
    NGImap4DisableIMAP4Pooling = NO;

    SOGoProfileURL = "mysql://sogo:[email protected]:3306/sogo/sogo_user_profile";
    OCSFolderInfoURL = "mysql://sogo:[email protected]:3306/sogo/sogo_folder_info";
    OCSSessionsFolderURL = "mysql://sogo:[email protected]:3306/sogo/sogo_sessions_folder";
    OCSEMailAlarmsFolderURL = "mysql://sogo:[email protected]:3306/sogo/sogo_alarms_folder";

    // With 3 parameters below, SOGo requires only 9 SQL tables in total
    // instead of creating 4 SQL tables for each user.
    OCSCacheFolderURL = "mysql://sogo:[email protected]:3306/sogo/sogo_cache_folder";
    OCSStoreURL = "mysql://sogo:[email protected]:3306/sogo/sogo_store";
    OCSAclURL = "mysql://sogo:[email protected]:3306/sogo/sogo_acl";

    // Default language in the web interface
    SOGoLanguage = English;

    // Specify which module to show after login: Calendar, Mail, Contacts.
    SOGoLoginModule = Mail;

    // Must login with full email address
    SOGoForceExternalLoginWithEmail = YES;

    // Allow user to change full name and email address.
    SOGoMailCustomFromEnabled = NO;

    // IMAP server
    // Local connection is considered as secure by Dovecot, so 'imap://' is fine.
    // With remote IMAP server, use 'imaps://127.0.0.1:143/?tls=YES' instead;
    SOGoIMAPServer = "imap://127.0.0.1:143/?tls=YES&tlsVerifyMode=allowInsecureLocalhost";

    // Allow user to add other IMAP accounts that will be visible from the SOGo
    // Webmail interface.
    // Default is NO.
    //SOGoMailAuxiliaryUserAccountsEnabled = YES;

    // SMTP server
    SOGoSMTPServer = "smtp://127.0.0.1:587/?tls=YES&tlsVerifyMode=allowInsecureLocalhost";
    SOGoMailingMechanism = smtp;
    SOGoSMTPAuthenticationType = PLAIN;

    // Enable managesieve service
    //
    // WARNING: Sieve scripts generated by SOGo is not compatible with Roundcube
    //          webmail, don't use sieve service in both webmails, otherwise
    //          it will be messy.
    //          FYI: https://docs.iredmail.org/why.no.sieve.support.in.sogo.html
    //
    //SOGoSieveServer = "sieve://127.0.0.1:4190/?tls=YES&tlsVerifyMode=allowInsecureLocalhost";
    //SOGoSieveScriptsEnabled = YES;
    //SOGoVacationEnabled = YES;
    //SOGoForwardEnabled = YES;
    SOGoSieveFolderEncoding = UTF-8;

    // Memcached
    SOGoMemcachedHost = 127.0.0.1;

    // Parameter used to set which usernames require administrative privileges
    // over all the users tables. For example, this could be used to post
    // events in the users calendar without requiring the user to configure
    // his/her ACLs. In this case you will need to specify those superuser's
    // usernames like this :
    // SOGoSuperUsernames = (<username1>[,<username2>, ...]);
    //SOGoSuperUsernames = ();

    SOGoTimeZone = "America/New_York";

    SOGoFirstDayOfWeek = 1;

    SOGoRefreshViewCheck = every_5_minutes;
    SOGoMailReplyPlacement = below;

    // Disable gravatar
    SOGoExternalAvatarsEnabled = NO;
    SOGoGravatarEnabled = NO;

    // Control WebDAV access to the Calendar / Contacts collections.
    // This can be used to deny access to these resources from Thunderbird
    // Lightning for example.
    // Defaults to YES when unset.
    //SOGoCalendarDAVAccessEnabled = NO;
    //SOGoAddressBookDAVAccessEnabled = NO;

    // Allow users to share publicly (ie., requiring not authentication) their
    // calendars and address books.
    // Defaults to NO when unset.
    //SOGoEnablePublicAccess = YES;

    //
    // Notifications
    //
    // Enable email-based alarms on events and tasks.
    SOGoEnableEMailAlarms = YES;

    // Notify meeting participants
    SOGoAppointmentSendEMailNotifications = YES;

    // Notify if a calendar or an address book has been created.
    SOGoFoldersSendEMailNotifications = NO;

    // Notify involved users of a calendar or address book's ACLs.
    SOGoACLsSendEMailNotifications = YES;

    // Notify when a modification is being done to his/her own calendar by someone else.
    SOGoNotifyOnExternalModifications = YES;

    // NOTE: PostgreSQL cannot update view in iRedMail
    SOGoPasswordChangeEnabled = YES;

    // Authentication using SQL
    
    SOGoUserSources = (
        {
            type = sql;
            id = users;
            viewURL = "mysql://sogo:[email protected]:3306/sogo/users";
            canAuthenticate = YES;

            // The algorithm used for password encryption when changing
            // passwords without Password Policies enabled.
            // Possible values are: plain, crypt, md5-crypt, ssha, ssha512.
            userPasswordAlgorithm = ssha512;
            prependPasswordScheme = YES;

            // Use `vmail.mailbox` as per-domain address book.
            isAddressBook = YES;
            displayName = "Domain Address Book";
            SOGoEnableDomainBasedUID = YES;
            DomainFieldName = "domain";

            // Listing of this LDAP source is only possible when performing a
            // search (respecting the SOGoSearchMinimumWordLength parameter)
            // or when explicitely typing a single dot.
            // Defaults to YES when unset.
            //
            // WARNING: if you have many accounts in this address book, it may
            //          reach server-side query size limit, or cause
            //          performance issue.
            listRequiresDot = NO;

            ModulesConstraints = {
                Mail = { c_webmail = y; };
                Calendar = { c_calendar = y; };
                ActiveSync = { c_activesync = y; };
            };
        },

        //{
        //    displayName = "Global Address Book";
        //    type = sql;
        //    id = global_address_book;
        //    viewURL = "mysql://sogo:[email protected]:3306/sogo/users";
        //    canAuthenticate = NO;
        //    isAddressBook = YES;
        //    listRequiresDot = NO;
        //    SOGoEnableDomainBasedUID = YES;
        //    DomainFieldName = "domain";
        //},

        // Display mailing aliases in address book.
        // You need to create SQL view 'sogo.aliases' first.
        //
        // For MySQL:
        //
        //  CREATE VIEW sogo.aliases (c_uid, c_name, c_password, c_cn, mail, domain)
        //          AS SELECT address, name, '', name, address, domain
        //          FROM vmail.alias WHERE active=1;
        //
        //{
        //    displayName = "Mailing Lists";
        //    type = sql;
        //    id = aliases;
        //    viewURL = "mysql://sogo:[email protected]:3306/sogo/aliases";
        //    canAuthenticate = NO;
        //    isAddressBook = YES;
        //    listRequiresDot = NO;
        //    SOGoEnableDomainBasedUID = YES;
        //    DomainFieldName = "domain";
        //},
    );
    

    // Authentication using LDAP
    /* LDAP backend
    SOGoUserSources = (
        {
            // Used for user authentication
            type = ldap;
            id = users;
            canAuthenticate = YES;
            isAddressBook = NO;
            displayName = "LDAP Authentication";

            hostname = "PH_LDAP_URI";
            baseDN = "domainName=%d,PH_LDAP_BASEDN";
            bindDN = "PH_LDAP_BINDDN";
            bindPassword = "PH_LDAP_BINDPW";
            filter = "objectClass=mailUser AND accountStatus=active AND enabledService=mail AND enabledService=sogo";
            scope = SUB;

            // always keep binding to the LDAP server using the DN of the
            // currently authenticated user. bindDN and bindPassword are still
            // required to find DN of the user.
            // Note: with default LDAP acl configured by iRedMail, user doesn't
            //       have privilege to query PH_LDAP_BASEDN.
            //       so this doesn't work.
            bindAsCurrentUser = YES;

            // The algorithm used for password encryption when changing
            // passwords without Password Policies enabled.
            // Possible values are: plain, crypt, md5-crypt, ssha, ssha512.
            userPasswordAlgorithm = ssha512;

            CNFieldName = cn;
            IDFieldName = mail;
            // value of UIDFieldName must be unique on entire server
            UIDFieldName = mail;
            IMAPLoginFieldName = mail;
            MailFieldNames = (mail);
            bindFields = (mail);

            ModulesConstraints = {
                Mail = { enabledService = sogowebmail; };
                Calendar = { enabledService = sogocalendar; };
                ActiveSync = { enabledService = sogoactivesync; };
            };

            GroupObjectClasses = (
                "mailList",
                "group",
                "groupOfNames",
                "groupOfUniqueNames",
                "posixgroup"
            );
        },
        {
            // Used for global address book
            type = ldap;
            id = global_addressbook;
            canAuthenticate = NO;
            isAddressBook = YES;
            displayName = "Global Address Book";
            bindAsCurrentUser = YES;

            // Listing of this LDAP source is only possible when performing a
            // search (respecting the SOGoSearchMinimumWordLength parameter)
            // or when explicitely typing a single dot.
            // Defaults to YES when unset.
            //
            // WARNING: if you have many accounts in this address book, it may
            //          reach server-side query size limit, or cause
            //          performance issue.
            listRequiresDot = NO;

            hostname = "PH_LDAP_URI";
            baseDN = "domainName=%d,PH_LDAP_BASEDN";
            bindDN = "PH_LDAP_BINDDN";
            bindPassword = "PH_LDAP_BINDPW";
            filter = "((enabledService=mail AND accountStatus=active AND enabledService=displayedInGlobalAddressBook) AND ((objectClass=mailUser AND enabledService=sogo) OR (objectClass=mailList) OR (objectClass=mailAlias)))";
            scope = SUB;

            IDFieldName = mail;
            bindFields = (mail);
            // value of UID field must be unique on whole server.
            UIDFieldName = mail;
            IMAPLoginFieldName = mail;

            CNFieldName = cn;
            SearchFieldNames = (cn, sn, displayName, telephoneNumber, mail, shadowAddress, departmentNumber);

            // Resources management (Free/Busy)
            // Reference: https://docs.iredmail.org/sogo.manage.resources.html
            KindFieldName = "Kind";
            MultipleBookingsFieldName = "MultipleBookings";
        }
    );
    LDAP backend */
}

nginx template for sogo on main domain

# Settings for SOGo Groupware

# SOGo
location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }

# Redirect /mail to /SOGo
#location ~ ^/mail { rewrite ^ https://$host/SOGo; }

# For Mac OS X and iOS devices.
rewrite ^/.well-known/caldav    /SOGo/dav permanent;
rewrite ^/.well-known/carddav   /SOGo/dav permanent;
rewrite ^/principals            /SOGo/dav permanent;

location ^~ /SOGo {
    include /etc/nginx/templates/hsts.tmpl;

    proxy_pass http://127.0.0.1:20000;

    # forward user's IP address
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;

    # always use https
    proxy_set_header x-webobjects-server-port $server_port;
    proxy_set_header x-webobjects-server-name $host;
    proxy_set_header x-webobjects-server-url  https://$host;
    proxy_set_header x-webobjects-server-protocol HTTP/1.0;

    proxy_busy_buffers_size   64k;
    proxy_buffers             8 64k;
    proxy_buffer_size         64k;
}

location ^~ /Microsoft-Server-ActiveSync {
    proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;

    proxy_connect_timeout 3540;
    proxy_send_timeout 3540;
    proxy_read_timeout 3540;

    proxy_busy_buffers_size   64k;
    proxy_buffers             8 64k;
    proxy_buffer_size         64k;
}

location ^~ /SOGo/Microsoft-Server-ActiveSync {
    proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;

    proxy_connect_timeout 3540;
    proxy_send_timeout 3540;
    proxy_read_timeout 3540;

    proxy_busy_buffers_size   64k;
    proxy_buffers             8 64k;
    proxy_buffer_size         64k;
}

location /SOGo.woa/WebServerResources/ {
    alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    expires max;
}
location /SOGo/WebServerResources/ {
    alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    expires max;
}
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
    alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
    expires max;
}

nginx template for running sogo on subdomain

#
# Run SOGo as a sub-domain virtual host.
#

root /usr/lib/GNUstep/SOGo/WebServerResources;

location / {
    rewrite ^ https://$host/SOGo;
}

# For Mac OS X and iOS devices.
rewrite ^/.well-known/caldav    /SOGo/dav permanent;
rewrite ^/.well-known/carddav   /SOGo/dav permanent;
rewrite ^/principals            /SOGo/dav permanent;

include /etc/nginx/templates/hsts.tmpl;

location ^~ /SOGo {
    proxy_pass http://127.0.0.1:20000;

    # forward user's IP address
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;

    # always use https
    proxy_set_header x-webobjects-server-port $server_port;
    proxy_set_header x-webobjects-server-name $host;
    proxy_set_header x-webobjects-server-url https://$host;
    proxy_set_header x-webobjects-server-protocol HTTP/1.0;

    proxy_busy_buffers_size   64k;
    proxy_buffers             8 64k;
    proxy_buffer_size         64k;
}

location ^~ /Microsoft-Server-ActiveSync {
    proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;

    proxy_connect_timeout 3540;
    proxy_send_timeout 3540;
    proxy_read_timeout 3540;

    proxy_busy_buffers_size   64k;
    proxy_buffers             8 64k;
    proxy_buffer_size         64k;
}

location ^~ /SOGo/Microsoft-Server-ActiveSync {
    proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;

    proxy_connect_timeout 3540;
    proxy_send_timeout 3540;
    proxy_read_timeout 3540;

    proxy_busy_buffers_size   64k;
    proxy_buffers             8 64k;
    proxy_buffer_size         64k;
}

location /SOGo.woa/WebServerResources/ {
    alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    expires max;
}
location /SOGo/WebServerResources/ {
    alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    expires max;
}
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
    alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
    expires max;
}
location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*\.(jpg|png|gif|css|js)$) {
    alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
    expires max;
}

Hopefully this helps to let us move forward to a working ActiveSync config.

@vsatmydynipnet
Copy link

I tried again, based on the iredmail settings to move things forward. But failed again, I am no dev, just tried hard.

So as bad as it is to move partially away from Yunohost, my friends are getting really mad on me meanwhile, also telling me they told me that Open Source does not work before they moved to Yunohost. I think the solution will be to suggest them iredmail mail server to run their ActiveSync stuff. The need of 2 servers iredmail and Yunohost for e.g. Wordpress and other stuff, will probably finally getting them move back to some of their Cloud Mail providers, which is really bad and all the work done to make them move away from there looks lost :-(.

If anybody want to recheck things, it would be greatly appreciated.

@vsatmydynipnet
Copy link

May I bring this one up again. Sogo without ActiveSync is really a troblemaker which will make people complaining alot. If we do not get this working there should be a UPPER CASE warning on the module info for non techies to know that they will fail.

@Josue-T
Copy link

Josue-T commented Mar 16, 2023

Hello,

I understand that this issue impact users but I don't have any application which use activesync so for me it's difficult to debug. But any help to understand the issue is really welcome.

@Josue-T
Copy link

Josue-T commented Mar 16, 2023

Looking your log it look like that the path /autodiscover/autodiscover.xml was tried by outlook and it fail as it's not managed by yunohost but I don't see anything about this in your provided config which works so as I understand it's not required.

@vsatmydynipnet
Copy link

Hello! Thank you for your answer. I am open to help you as much as I can that we are able to resolve the problem. But it would be pretty easy to test also for people like you and me, not using Outlook.

Feel free to tell me how I can help to resolve the problem.

@vsatmydynipnet
Copy link

I am still looking for a solution, so I bring this one up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

6 participants