• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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
 
Back
Top