diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index 93de0572..2aebd380 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -14,12 +14,13 @@ add_header Content-Security-Policy "frame-ancestors 'none';"; } - location ~ ^/((caldav|carddav|webdav).*)$ { # Z-Push doesn't like getting a redirect, and a plain rewrite didn't work either. # Properly proxying like this seems to work fine. proxy_pass https://127.0.0.1/cloud/remote.php/$1; } + + # These need to be updated to support External CalDAV/CardDAV rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last; rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last; rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect; diff --git a/management/templates/sync-guide-ext.html b/management/templates/sync-guide-ext.html new file mode 100644 index 00000000..55e60f50 --- /dev/null +++ b/management/templates/sync-guide-ext.html @@ -0,0 +1,49 @@ +
+

Contacts & Calendar Synchronization

+ +

This box can hold your contacts and calendar, just like it holds your email.

+ +
+ +
+
+

In your browser

+ +

You can edit your contacts and calendar from your web browser.

+ + + + + +
For... Visit this URL
Contacts https://DAV_HOSTNAMECARDDAV_URL
Calendar https://DAV_HOSTNAMECARDDAV_URL
+ +

Log in settings are the same as with mail: your + complete email address and your mail password.

+
+ +
+

On your mobile device

+ +

If you set up your mail using Exchange/ActiveSync, + your contacts and calendar may already appear on your device.

+

Otherwise, here are some apps that can synchronize your contacts and calendar to your Android phone.

+ + + + + + +
For... Use...
Contacts and Calendar DAVx⁵ ($5.99; free here)
Only Contacts CardDAV-Sync free (free)
Only Calendar CalDAV-Sync ($2.99)
+ +

Use the following settings:

+ + + + + + + +
Account Type CardDAV or CalDAV
Server Name {{hostname}}
Use SSL Yes
Username Your complete email address.
Password Your mail password.
+
+
+
diff --git a/setup/web.sh b/setup/web.sh index 4433ff0d..282f5fb8 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -124,7 +124,7 @@ chmod a+r /var/lib/mailinabox/mozilla-autoconfig.xml # Create a generic mta-sts.txt file which is exposed via the # nginx configuration at /.well-known/mta-sts.txt -# more documentation is available on: +# more documentation is available on: # https://www.uriports.com/blog/mta-sts-explained/ # default mode is "enforce". In /etc/mailinabox.conf change # "MTA_STS_MODE=testing" which means "Messages will be delivered @@ -152,3 +152,12 @@ restart_service php7.2-fpm # Open ports. ufw_allow http ufw_allow https + +#Correct information on the Contact/Calendar informational page with External CardDAV/CalDAV URLs +if [ $DAV_HOSTNAME != $PRIMARY_HOSTNAME ]; then + mv management/templates/sync-guide.html management/templates/sync-guide-orig.html + cp management/templates/sync-guide-ext.html management/templates/sync-guide.html + sed -i "s/DAV_HOSTNAME/$DAV_HOSTNAME" management/templates/sync-guide.html + #sed -i "s/CALDAV_URL/$CALDAV_URL" management/tempmlates/sync-guide.html + #sec -i "s/CARDDAV_URL/$CARDDAV_URL" management/templates/sync-guide.html +fi