• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Important New Plesk webmail / SOGo Webmail extension

The SOGo Webmail extension installs SOGo from two different repositories; it depends on the used OS;



(c) extension's description


During the first installation, the extension adds a repository to the system package manager; stable packages come from the OS vendor repository, and nightly packages come from the SOGo vendor.

The ability to install a new version depends on the repository. Does it have the required package? If yes, then the system package manager should be able to install it as a regular package update; nothing special is required.

Just an example with Ubuntu 22 and nightly repository (Version: 5.11.2.20250121-1):
Code:
# plesk version
Product version: Plesk Obsidian 18.0.66.2
     OS version: Ubuntu 22.04 x86_64
     Build date: 2025/01/06 19:00
       Revision: fcc3e7658544f6ffd1277b651affa9f4bb30e613

# apt info sogo | grep -E '^(Package|Version|APT-Sources)'
Package: sogo
Version: 5.11.2.20250121-1
APT-Sources: https://packages.sogo.nu/nightly/5/ubuntu jammy/jammy amd64 Packages
If one adds this repo does the install update with new nightlies every time one does apt update?
 
Yes, updating will work in a standard way, as the package manager usually does. But this also means that even if the latest package contains some incompatibility or bugs, it will still be installed; nightly packages' compatibility is not guaranteed.
 
IMHO CloudLinux 8.x which is installed upon AlmaLinux 8.x. for compatiblity for older PHP-versions should also be included as support OS.
 
Hello everyone,

I got active-sync working with the SOGo extension.
Currently not using it in production but the first tests with calendar, contacts, notes and mail are looking good.

What I did:
  1. Install SOGo extension
  2. Install active-sync package
    Bash:
    sudo apt install sogo-activesync
  3. Update the SOGo config to enable active-sync in SOGo
    1. Copy the template plesk uses, for the sogo.conf file, to the custom template location
      Bash:
      cp -a /usr/local/psa/var/modules/sogo/templates/sogo.template.twig /usr/local/psa/var/modules/sogo/custom_templates/
    2. Edit the template file in the custom_templates directory
      Bash:
      nano /usr/local/psa/var/modules/sogo/custom_templates/sogo.template.twig
    3. Add the following lines somewhere inside the brackets and save
      Bash:
      SOGoEnableEAS = YES;
      SOGoEASDisableUI = NO;
  4. Update the nginx config file to proxy active-sync request to SOGo
    1. Copy the template plesk uses, for the nginx config, to the custom template location
      Bash:
      cp -a /usr/local/psa/var/modules/sogo/templates/nginx.template.twig /usr/local/psa/var/modules/sogo/custom_templates/
    2. Edit the template file in the custom_templates directory
      Bash:
      nano /usr/local/psa/var/modules/sogo/custom_templates/nginx.template.twig
    3. Add the following lines inside the brackets and save
      NGINX:
      location /Microsoft-Server-ActiveSync {
          access_log /var/log/nginx/activesync.log;
          # deny anonymous; deny other http methods
          if ( $remote_user     =   "" )              { return 444; break; }
          if ( $request_method !~* ^(POST|OPTIONS)$ ) { return 444; break; }
          # extract domain and user-id
          if ( $remote_user     ~* ^(.+)\x5C(.+)$ )   { set $domain $1; set $userid $2; }
          if ( $remote_user    !~* ^(.+)\x5C(.+)$ )   { return 444; break; }
          # replace underscores in username
          if ( $userid          ~* ^(.+)_(.+)$ )      { set $userdn $1x$2; }
          if ( $userid         !~* ^(.+)_(.+)$ )      { set $userdn $userid; }
          # extract device-type and version
          if ( $http_user_agent ~* ^MSFT-(.+)/(.+)\.(.+)\.(.+)$ )  { set $device MSFT$1;  set $versio $2x$3x$4; }
          if ( $http_user_agent ~* ^Apple-iPhone(.*)/(.+)\.(.+)$ ) { set $device iPhone;  set $versio $1x$2x$3; }
          if ( $http_user_agent ~* ^Apple-iPad(.+)/(.+)\.(.+)$ )   { set $device iPad;    set $versio $1x$2x$3; }
          if ( $http_user_agent ~* ^Apple-iPod(.+)/(.+)\.(.+)$ )   { set $device iPod;    set $versio $1x$2x$3; }
          if ( $http_user_agent ~* ^Android-(.+)/(.+)\.(.+)$ )     { set $device Android; set $versio $1x$2x$3; }
          # always allow initial requests without arguments
          set $initia $request_method:$args;
          if ( $initia ~* ^OPTIONS:$ ) { set $target $domain-exchange; set $versio ok; }
          if ( $versio =  "" )         { return 444; break; }
          # set target, if usernames match
          if ( $userid =  $arg_User )  { set $target $domain-$userdn-$arg_DeviceId-$device-$versio; }
          # forward request
          proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;
      }
  5. Now you need to reconfigure plesk web-server as well as SOGo
    Bash:
    plesk sbin httpdmng --reconfigure-all
    plesk ext sogo configure
Happy mailing :cool:
@AYamshanov anything holding this back being implemented by plesk directly?

Client setup
  • Apple Mail on iPhone (Tested)
    1. Select "Microsoft Exchange"
    2. Enter email
    3. Select Manual setup
    4. For server and domain enter your webmail domain
    5. Enter password

Work in progress
  • Since the templates are only for the extension and therefore only apply to the webmail the active-sync is configured on the webmail subdomain not on the main domain, as you can see in the client setup
    • If thats a problem you can manually add the nginx directive from step 4.3. to you domain.
      Just go to your domain in plesk select "Hosting & DNS", and click on "Apache & nginx". There all the way at the bottom add the additional nginx directive.
  • I did some testing with emails but noticed there are some default folders missing, investigating that currently
References

I love that Dennis was able to do this, has anyone been able to expand on the "work in progress", or find a better way to use ActiveSync without the cost of Plesk Advanced Mail?
 
So result of support ticket... Plesk supports CloudLinux, but apparently not with SOGo Webmail. Really? Plesk is getting worse by the day... Support even gave a link to a DirectAdmin solution. Haha. Seems Plesk support even thinks Plesk is EOL.
 
Plesk supports CloudLinux, but apparently not with SOGo Webmail. Really?

Just for the history, based on the SOGo website, they do not say they support CloudLinux (Installation and Configuration Guide I think it is absolutely normal if Plesk does not provide supporting one 3rd party solution on top of another 3rd-party solution. If you have any other information regarding supporting SOGo on CloudLinux 8/9, please let us know.
 
Hello everyone,

I got active-sync working with the SOGo extension.
Currently not using it in production but the first tests with calendar, contacts, notes and mail are looking good.

What I did:
  1. Install SOGo extension
  2. Install active-sync package
    Bash:
    sudo apt install sogo-activesync
  3. Update the SOGo config to enable active-sync in SOGo
    1. Copy the template plesk uses, for the sogo.conf file, to the custom template location
      Bash:
      cp -a /usr/local/psa/var/modules/sogo/templates/sogo.template.twig /usr/local/psa/var/modules/sogo/custom_templates/
    2. Edit the template file in the custom_templates directory
      Bash:
      nano /usr/local/psa/var/modules/sogo/custom_templates/sogo.template.twig
    3. Add the following lines somewhere inside the brackets and save
      Bash:
      SOGoEnableEAS = YES;
      SOGoEASDisableUI = NO;
  4. Update the nginx config file to proxy active-sync request to SOGo
    1. Copy the template plesk uses, for the nginx config, to the custom template location
      Bash:
      cp -a /usr/local/psa/var/modules/sogo/templates/nginx.template.twig /usr/local/psa/var/modules/sogo/custom_templates/
    2. Edit the template file in the custom_templates directory
      Bash:
      nano /usr/local/psa/var/modules/sogo/custom_templates/nginx.template.twig
    3. Add the following lines inside the brackets and save
      NGINX:
      location /Microsoft-Server-ActiveSync {
          access_log /var/log/nginx/activesync.log;
          # deny anonymous; deny other http methods
          if ( $remote_user     =   "" )              { return 444; break; }
          if ( $request_method !~* ^(POST|OPTIONS)$ ) { return 444; break; }
          # extract domain and user-id
          if ( $remote_user     ~* ^(.+)\x5C(.+)$ )   { set $domain $1; set $userid $2; }
          if ( $remote_user    !~* ^(.+)\x5C(.+)$ )   { return 444; break; }
          # replace underscores in username
          if ( $userid          ~* ^(.+)_(.+)$ )      { set $userdn $1x$2; }
          if ( $userid         !~* ^(.+)_(.+)$ )      { set $userdn $userid; }
          # extract device-type and version
          if ( $http_user_agent ~* ^MSFT-(.+)/(.+)\.(.+)\.(.+)$ )  { set $device MSFT$1;  set $versio $2x$3x$4; }
          if ( $http_user_agent ~* ^Apple-iPhone(.*)/(.+)\.(.+)$ ) { set $device iPhone;  set $versio $1x$2x$3; }
          if ( $http_user_agent ~* ^Apple-iPad(.+)/(.+)\.(.+)$ )   { set $device iPad;    set $versio $1x$2x$3; }
          if ( $http_user_agent ~* ^Apple-iPod(.+)/(.+)\.(.+)$ )   { set $device iPod;    set $versio $1x$2x$3; }
          if ( $http_user_agent ~* ^Android-(.+)/(.+)\.(.+)$ )     { set $device Android; set $versio $1x$2x$3; }
          # always allow initial requests without arguments
          set $initia $request_method:$args;
          if ( $initia ~* ^OPTIONS:$ ) { set $target $domain-exchange; set $versio ok; }
          if ( $versio =  "" )         { return 444; break; }
          # set target, if usernames match
          if ( $userid =  $arg_User )  { set $target $domain-$userdn-$arg_DeviceId-$device-$versio; }
          # forward request
          proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;
      }
  5. Now you need to reconfigure plesk web-server as well as SOGo
    Bash:
    plesk sbin httpdmng --reconfigure-all
    plesk ext sogo configure
Happy mailing :cool:
@AYamshanov anything holding this back being implemented by plesk directly?

Client setup
  • Apple Mail on iPhone (Tested)
    1. Select "Microsoft Exchange"
    2. Enter email
    3. Select Manual setup
    4. For server and domain enter your webmail domain
    5. Enter password

Work in progress
  • Since the templates are only for the extension and therefore only apply to the webmail the active-sync is configured on the webmail subdomain not on the main domain, as you can see in the client setup
    • If thats a problem you can manually add the nginx directive from step 4.3. to you domain.
      Just go to your domain in plesk select "Hosting & DNS", and click on "Apache & nginx". There all the way at the bottom add the additional nginx directive.
  • I did some testing with emails but noticed there are some default folders missing, investigating that currently
References

I couldn't for the life of me get the SOGo-ActiveSync to work, but looking at the config:
Bash:
sudo grep 'viewURL' /etc/sogo/sogo.conf
This outputs:
Code:
viewURL = "mysql://sogo_USERNAME:sogo_PASSWORD@localhost:3306/sogo_DATABASE/sogo_users_view";

And using the output of the grep (username/database/password) to look in the database:
Bash:
mysql -h localhost -P 3306 -u sogo_USERNAME -p sogo_DATABASE
Then type/paste in the sogo_PASSWORD and press enter.
Once in the SQL console, query the user:
SQL:
MariaDB [sogo_DATABASE]> SELECT * FROM sogo_users_view;
+----------------+----------------+----------------+----------------+-------------------------------+-----------+
| c_uid          | c_name         | c_cn           | mail           | c_password                    | domain    |
+----------------+----------------+----------------+----------------+-------------------------------+-----------+
| [email protected] | [email protected] | [email protected] | [email protected] | {SSHA512}SomeLongShah512Hash= | domain.uk |
+----------------+----------------+----------------+----------------+-------------------------------+-----------+
1 row in set (0.000 sec)

I realised the usernames are stored as `[email protected]`. But the original code was only allowing usernames in the format domain.uk\username. I could get it to work if I used domain.uk\[email protected]. So I updated the nginx code:

Edit the `nginx.template.twig` custom template:
Bash:
sudo nano /usr/local/psa/var/modules/sogo/custom_templates/nginx.template.twig

I replaced these lines from @Dennis Rahmen:

NGINX:
        if ( $remote_user     ~* ^(.+)\x5C(.+)$ )   { set $domain $1; set $userid $2; }
        if ( $remote_user    !~* ^(.+)\x5C(.+)$ )   { return 444; break; }

with these lines
NGINX:
        # Initialize variables
        set $userid "";
        set $domain "";

        # Extract domain and user-id when used in the format domain\user@domain
        if ( $remote_user ~* ^(.+)\x5C(.+)@(.+)$ ) { set $userid $2@$3; set $domain $1; }

        # Extract domain and user-id when used in the format user@domain
        if ( $remote_user ~* ^([^\\\]+)@(.+)$ )    { set $userid $remote_user; set $domain $2; }

        # Extract domain and user-id when used in the format domain\user
        if ( $remote_user ~* ^(.+)\x5C([^@]+)$ )   { set $domain $1; set $userid $2@$1; }

        # If it is neither of the three options, so $userid or $domain is empty, exit out
        if ( $userid = "" ) { return 444; break; }
        if ( $domain = "" ) { return 444; break; }

        # OLD ENTRIES PREVIOUSLY USED
        #if ( $remote_user     ~* ^(.+)\x5C(.+)$ )   { set $domain $1; set $userid $2; }
        #if ( $remote_user    !~* ^(.+)\x5C(.+)$ )   { return 444; break; }

Then reconfigure the Plesk web server and SOGo extension
Bash:
sudo plesk sbin httpdmng --reconfigure-all
sudo plesk ext sogo configure

For me on Android, it wouldn't accept domain.uk\user, but I've left it in as it sounds like it does work for Apple devices.

Tested on Gmail app on Android:
  1. Open Gmail app
  2. Select the circle top right
  3. Select Add another account
  4. Select Exchange and Office 365
  5. Email: Enter your email address as [email protected]
  6. Select Set up manually
  7. Account Infosection
    1. Email: Email address should be entered already
    2. Password: Enter your password
    3. Client certificate: None already selected
  8. Server Settingssection
    1. Domain\Username: Email address already entered
    2. Server: Domain already entered, add "webmail" at the beginning (so it becomes webmail.domain.uk)
    3. Port: 443 already entered
    4. Security type: SSL/TLS already selected
  9. Click Next
  10. Click Done
 
Since I updated Plesk to 18.0.80 today (which also updated the nightly build of SOGo), the software doesn't work anymore.
Clicking the buttons to send an e-mail doesn't do anything and throws an 501 error in the developer console.
 
It seems this commit in SOGo caused the problem and was rolled into yesterday's nightly build: fix(mail): escape angularJS directive for description · Alinto/sogo@47133fd

I attempted to somehow send them a bug report, but for regular users that is basically impossible - even after registering on their bug tracker it was not possible to actually file a bug, as users only have 'watcher' status.

It however seems they already noticed the problem themselves and corrected it in this commit: fix(bug): incorrect method called · Alinto/sogo@1caa257

So I hope the next nightly build will no longer have this problem.
 
I can confirm that after applying today's nightly build the problem is resolved.

Also, because I see no other way to inform you:
I am for some reason blocked from posting new threads on this forum, but I can post replies to already existing threads without problem.
Next to the "There was an error" message in the UI of the forum, I receive this error in the development console of the browser, hinting at a Cloudflare issue:
1786528688442.png

I originally intended to create a new thread for this issue, but wasn't able to due to this.
I'm using a business line with a static IP, but there is no services (like mail or similar) running on it and the reputation of the IP is fine on all checkers.
Just in case you could fix this for the future.
 
Thank you for the confirmation that the issue with Sogo is resolved, @D3nnis3n .

Regarding the posting issue on the forum - could you please open the browser console, attempt to replicate the issue and copy the cf-ray code from the response header? You can send it to me in a private message. Thank you in advance.
 
I will the next time I need to create a thread and it doesn't work.
It currently looks like I would be able to send something (I can switch to BBCode mode, which was also blocked when I was blocked from sending the thread) and I don't want to create a useless thread :) Thanks for letting me know I can send a DM, I hope I would actually be able to do so if I'm blocked again, though.
 
Back
Top