From c872e6a9f01f2947387d06fdd659cc91d797cd73 Mon Sep 17 00:00:00 2001 From: Norman Date: Wed, 5 Nov 2014 17:17:38 +0100 Subject: [PATCH] iOS Configuration Profile change name removed .vagrant fix guide layout --- .gitignore | 1 + management/templates/mail-guide.html | 17 ++++ setup/mobileconfig.sh | 135 +++++++++++++++++++++++++++ setup/start.sh | 2 +- 4 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 setup/mobileconfig.sh diff --git a/.gitignore b/.gitignore index e22c1d9f..f3cdb1bc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ management/__pycache__/ tools/__pycache__/ externals/ .env +.vagrant diff --git a/management/templates/mail-guide.html b/management/templates/mail-guide.html index 3d0cec92..05b123c8 100644 --- a/management/templates/mail-guide.html +++ b/management/templates/mail-guide.html @@ -59,6 +59,23 @@

Your device should also provide a contacts list and calendar that syncs to this box when you use this method.

+ +
+

iOS Mobileconfig

+ +

Open the following configuration on your iOS device.

+ +

https://{{hostname}}/mailinabox.mobileconfig

+ +

Use these settings when prompted:

+ + + + +
Username: Your whole email address.
Password: Your mail password.
+ +

Your device should also provide a contacts list and calendar that syncs to this box when you use this method.

+
diff --git a/setup/mobileconfig.sh b/setup/mobileconfig.sh new file mode 100644 index 00000000..b8bcdd3e --- /dev/null +++ b/setup/mobileconfig.sh @@ -0,0 +1,135 @@ +#!/bin/bash +# +# iOS Configuration Profile +# ---------------------------------------------- +# +# Mobileconfig for iOS users to setup IMAP, Contacts & Calendars +# +# https://developer.apple.com/library/ios/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html + +source setup/functions.sh # load our functions +source /etc/mailinabox.conf # load global vars + +echo "Generate iOS Configuration Profile" + +echo " + + + + PayloadContent + + + CalDAVAccountDescription + Mail-in-a-box Calendar + CalDAVHostName + $PRIMARY_HOSTNAME + CalDAVPort + 443 + CalDAVPrincipalURL + /cloud/remote.php/caldav/calendars/ + CalDAVUseSSL + + PayloadDescription + CalDAV-Account + PayloadDisplayName + CalDAV (Mail-in-a-box Calendar) + PayloadIdentifier + com.mailinabox.setup.CalDAV + PayloadOrganization + + PayloadType + com.apple.caldav.account + PayloadUUID + $(cat /proc/sys/kernel/random/uuid) + PayloadVersion + 1 + + + EmailAccountDescription + Mail-in-a-box Mail + EmailAccountType + EmailTypeIMAP + IncomingMailServerAuthentication + EmailAuthPassword + IncomingMailServerHostName + $PRIMARY_HOSTNAME + IncomingMailServerPortNumber + 993 + IncomingMailServerUseSSL + + OutgoingMailServerAuthentication + EmailAuthPassword + OutgoingMailServerHostName + $PRIMARY_HOSTNAME + OutgoingMailServerPortNumber + 587 + OutgoingMailServerUseSSL + + OutgoingPasswordSameAsIncomingPassword + + PayloadDescription + E-Mail-Account + PayloadDisplayName + IMAP-Account + PayloadIdentifier + com.mailinabox.setup.E-Mail + PayloadOrganization + + PayloadType + com.apple.mail.managed + PayloadUUID + $(cat /proc/sys/kernel/random/uuid) + PayloadVersion + 1 + PreventAppSheet + + PreventMove + + SMIMEEnabled + + + + CardDAVAccountDescription + Mail-in-a-box Contacts + CardDAVHostName + $PRIMARY_HOSTNAME + CardDAVPort + 443 + CardDAVPrincipalURL + /cloud/remote.php/carddav/addressbooks/ + CardDAVUseSSL + + PayloadDescription + CardDAV-Accounts + PayloadDisplayName + CardDAV + PayloadIdentifier + com.mailinabox.setup.carddav + PayloadOrganization + + PayloadType + com.apple.carddav.account + PayloadUUID + $(cat /proc/sys/kernel/random/uuid) + PayloadVersion + 1 + + + PayloadDescription + Mail, Contacts & Calendar + PayloadDisplayName + Mail-in-a-box + PayloadIdentifier + com.mailinabox.setup + PayloadOrganization + + PayloadRemovalDisallowed + + PayloadType + Configuration + PayloadUUID + $(cat /proc/sys/kernel/random/uuid) + PayloadVersion + 1 + +" > "$STORAGE_ROOT/www/default/mailinabox.mobileconfig"; diff --git a/setup/start.sh b/setup/start.sh index d84669b3..c47aaee2 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -125,6 +125,7 @@ source setup/webmail.sh source setup/owncloud.sh source setup/zpush.sh source setup/management.sh +source setup/mobileconfig.sh # Write the DNS and nginx configuration files. sleep 5 # wait for the daemon to start @@ -160,4 +161,3 @@ openssl x509 -in $STORAGE_ROOT/ssl/ssl_certificate.pem -noout -fingerprint \ echo echo Then you can confirm the security exception and continue. echo -