Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: CalDAV/CardDAV & nginx Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
FencepostErr1r
Newbie
Newbie


Joined: 05 December 2013
Location: Germany
Online Status: Offline
Posts: 6
Posted: 05 December 2013 at 6:33pm | IP Logged Quote FencepostErr1r

Hello,
I'm currently evaluating WebMail Pro for my personal mail server.
WebMail Pro is currently hosted inside of a FreeBSD Jail running nginx 1.4.4 with PHP 5.5 and PHP-FPM.
The Webinterface & Mail-access works without any noticeable problems, but I'm not able to get CalDAV / CardDAV to work.
When using the configuration profile provided by WebMail Pro when accessed from an iOS (7.0.4) device, neither Contacts nor Calendars show up in the appropriate apps.
Manually connecting from the iOS device using the given URLs doesn't work either, same with Calendar / Contacts from OS X 10.9 (The application throws an error complaining about not being able to verify the username / password).

I already consulted the Online Documentation on DAV server configuration and adapted the given nginx serverblock to my setup to no avail.


Configuration for webmail.example.com :
Code:

server {
     listen 443 ssl;

     add_header "Strict-Transport-Security" "max-age=86400";
     ssl on;
     ssl_certificate /www/vhosts/webmail.example.com/ssl/webmail.example.com.crt;
     ssl_certificate_key /www/vhosts/webmail.example.com/ssl/webmail.example.com.key;
     ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;

     ssl_ciphers  ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES256-GCM-SHA384:ECDH-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE- RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDH-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SH A:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA;
     ssl_prefer_server_ciphers on;

     server_name  webmail.example.com;

     root  /www/vhosts/webmail.example.com/htdocs;

     if ($http_host != "webmail.example.com") {
          rewrite ^ https://webmail.example.com$request_uri permanent;
     }

     location / {
          index index.php index.html;
     }

     location ~ ^(.+\.php)(.*)$ {
          fastcgi_pass *snip*;
          try_files $fastcgi_script_name =404;
          fastcgi_split_path_info ^(.+\.php)(.*)$;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          fastcgi_param  PATH_INFO     $fastcgi_path_info;
          fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
          include     fastcgi_params;
     }

     location ~ \.php$ {
          fastcgi_pass *snip*;
          try_files $uri = 404;
          fastcgi_split_path_info ^(.+\.php)(.*)$;
          fastcgi_param PATH_INFO $fastcgi_path_info;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
          include     fastcgi_params;
     }

}


Directory listing:
Code:

# ls -la /www/vhosts/webmail.example.com/htdocs

drwxr-xr-x  13 www             webmail.example.com    512 Dec  1 17:08 .
dr-xr-x---   7 webmail.example.com  webmail.example.com    512 Nov 29 23:34 ..
-rw-r--r--   1 www             webmail.example.com  22884 Nov 19 17:08 LICENSE
-rw-r--r--   1 www             webmail.example.com      7 Nov 19 17:08 VERSION
drwxr-xr-x   5 www             webmail.example.com    512 Nov 30 00:15 adminpanel
drwxr-xr-x   2 www             webmail.example.com    512 Nov 30 00:15 crons
drwxr-xr-x   8 webmail.example.com  webmail.example.com    512 Nov 30 14:57 data
drwxr-xr-x   2 www             webmail.example.com    512 Nov 30 00:15 dav
-rw-r--r--   1 www             webmail.example.com    673 Nov 19 17:08 dav.php
drwxr-xr-x   3 www             webmail.example.com    512 Nov 30 00:15 examples
-rw-r--r--   1 www             webmail.example.com  17542 Nov 19 17:08 favicon.ico
drwxr-xr-x   3 www             webmail.example.com   1024 Nov 30 00:15 i18n
-rw-r--r--   1 www             webmail.example.com   2419 Nov 19 17:08 index.php
drwxr-xr-x  11 www             webmail.example.com    512 Nov 30 00:15 libraries
drwxr-xr-x   2 www             webmail.example.com    512 Nov 30 00:15 migration
-rw-r--r--   1 www             webmail.example.com     26 Nov 19 17:08 robots.txt
drwxr-xr-x   3 www             webmail.example.com    512 Nov 30 00:15 skins
drwxr-xr-x   4 www             webmail.example.com    512 Nov 30 00:15 static
drwxr-xr-x   4 www             webmail.example.com    512 Nov 30 00:15 templates



This is the DAV server URL specified in the admin panel:
Code:

https://webmail.example.com/dav.php/


Thank you for your help in advance,


-FencepostErr1r
Back to Top View FencepostErr1r's Profile Search for other posts by FencepostErr1r
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6088
Posted: 05 December 2013 at 11:39pm | IP Logged Quote Igor

As far as we know, in case of iOS 7.* it is required to provide a dedicated subdomain or port for DAV server, the approach with URL like https://webmail.example.com/dav.php/ is not going to work.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
FencepostErr1r
Newbie
Newbie


Joined: 05 December 2013
Location: Germany
Online Status: Offline
Posts: 6
Posted: 06 December 2013 at 12:49pm | IP Logged Quote FencepostErr1r

Well, this wasn't very helpful. Thanks for basically citing the "documentation" for DAV server setup.

Oh well, this might save me some time - without this I won't have to eval WebMail Pro any longer.

If you have anything else to offer, I'll keep an eye on this thread while trying out alternative products.


-FencepostErr1r
Back to Top View FencepostErr1r's Profile Search for other posts by FencepostErr1r
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6088
Posted: 08 December 2013 at 8:56pm | IP Logged Quote Igor

The information I provided comes directly from the developer in charge of DAV server integration. There is simply no other solution here, enabling a dedicated subdomain or port is required.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
FencepostErr1r
Newbie
Newbie


Joined: 05 December 2013
Location: Germany
Online Status: Offline
Posts: 6
Posted: 12 December 2013 at 11:23am | IP Logged Quote FencepostErr1r

Thanks Igor. Now I've got a working Card/CalDAV sync on my iOS devices.

Using the appended configuration I am able to connect to the CalDAV server, but CardDAV does not work.
Adding the CardDAV account works, but contacts are not displayed. When returning to the settings pane, the app throws an error, complaining that the password/username cloud not be verified.

This URL is used to add the CardDAV account:
Code:

https://webmail.example.com:8443/addressbooks/johndoe@example.com/Default


This is the current configuration:
Code:

server {
     listen 443 ssl;

     add_header "Strict-Transport-Security" "max-age=86400";
     ssl on;
     ssl_certificate /www/vhosts//ssl/webmail.example.com.crt;
     ssl_certificate_key /www/vhosts/webmail.example.com/ssl/webmail.example.com.key;
     ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;

     ssl_ciphers  ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES256-GCM-SHA384:ECDH-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE- RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDH-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SH A:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA;
     ssl_prefer_server_ciphers on;

     server_name  webmail.example.com;

     root  /www/vhosts/webmail.example.com/htdocs;

     if ($http_host != "webmail.example.com") {
          rewrite ^ https://webmail.example.com$request_uri permanent;
     }

     location / {
          index index.php index.html;
     }

     location ~ ^(.+\.php)(.*)$ {
          fastcgi_pass *snip*;
          try_files $fastcgi_script_name =404;
          fastcgi_split_path_info ^(.+\.php)(.*)$;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          fastcgi_param  PATH_INFO     $fastcgi_path_info;
          fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
          include     fastcgi_params;
     }

     # Catch other php based URL
     location ~ \.php$ {
          fastcgi_pass *snip*;
          try_files $uri = 404;
          fastcgi_split_path_info ^(.+\.php)(.*)$;
          fastcgi_param PATH_INFO $fastcgi_path_info;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
          include     fastcgi_params;
     }

}


server {
     listen 8443 ssl;

        add_header "Strict-Transport-Security" "max-age=86400";
        ssl on;
        ssl_certificate /www/vhosts/webmail.example.com/ssl/webmail.example.com.crt;
        ssl_certificate_key /www/vhosts/webmail.example.com/ssl/webmail.example.com.key;
        ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;

     ssl_ciphers  ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES256-GCM-SHA384:ECDH-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE- RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDH-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SH A:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA;
        ssl_prefer_server_ciphers on;

     server_name webmail.example.com;

     root /www/vhosts/webmail.example.com/htdocs/dav/;

     index server.php;
     charset utf-8;
     server_name_in_redirect off;

     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     fastcgi_param PATH_INFO $fastcgi_script_name;
     fastcgi_index server.php;
     include     fastcgi_params;

     
     location = /favicon.ico { access_log off; log_not_found off; }
     location = /robots.txt { access_log off; log_not_found off; }

     location / {
          if (!-d $request_filename) {
               rewrite ^(.*) /server.php last;
          }
     
          if ($request_method ~ ^(PROPFIND|OPTIONS|PUT|DELETE|MKCOL|COPY|MOVE)$) {
               fastcgi_pass *snip*;
          }

          location ~ \.php$ {
               fastcgi_pass *snip*;
          }
     }
}


The directory listing initially posted still applies.

Thanks for your patience,

-FencepostErr1r
Back to Top View FencepostErr1r's Profile Search for other posts by FencepostErr1r
 
FencepostErr1r
Newbie
Newbie


Joined: 05 December 2013
Location: Germany
Online Status: Offline
Posts: 6
Posted: 12 December 2013 at 11:28am | IP Logged Quote FencepostErr1r

I found a typo / censoring error in the ssl_certificate directive.
The correct line is:

Code:

ssl_certificate /www/vhosts/webmail.example.com/ssl/webmail.example.com.crt;
Back to Top View FencepostErr1r's Profile Search for other posts by FencepostErr1r
 
FencepostErr1r
Newbie
Newbie


Joined: 05 December 2013
Location: Germany
Online Status: Offline
Posts: 6
Posted: 13 December 2013 at 6:58am | IP Logged Quote FencepostErr1r

I found some reports of OSX Contacts.app causing problems when the username contains an '@'.
Can anyone report if this bug still exists in Mavericks?

-FencepostErr1r
Back to Top View FencepostErr1r's Profile Search for other posts by FencepostErr1r
 
FencepostErr1r
Newbie
Newbie


Joined: 05 December 2013
Location: Germany
Online Status: Offline
Posts: 6
Posted: 24 December 2013 at 7:26am | IP Logged Quote FencepostErr1r

The issue was resolved during installation of the licensed product.
I can only encourage anyone having this problem to get in contact with the support team, they are very friendly and competent!

-FencepostErr1r
Back to Top View FencepostErr1r's Profile Search for other posts by FencepostErr1r
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide