#!/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 $PRIMARY_HOSTNAME (Mail-in-a-Box) PayloadDisplayName $PRIMARY_HOSTNAME calendar PayloadIdentifier email.mailinabox.mobileconfig.$PRIMARY_HOSTNAME.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 $PRIMARY_HOSTNAME (Mail-in-a-Box) PayloadDisplayName $PRIMARY_HOSTNAME mail PayloadIdentifier email.mailinabox.mobileconfig.$PRIMARY_HOSTNAME.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 $PRIMARY_HOSTNAME (Mail-in-a-Box) PayloadDisplayName $PRIMARY_HOSTNAME contacts PayloadIdentifier email.mailinabox.mobileconfig.$PRIMARY_HOSTNAME.carddav PayloadOrganization PayloadType com.apple.carddav.account PayloadUUID $(cat /proc/sys/kernel/random/uuid) PayloadVersion 1 PayloadDescription $PRIMARY_HOSTNAME (Mail-in-a-Box) PayloadDisplayName $PRIMARY_HOSTNAME PayloadIdentifier email.mailinabox.mobileconfig.$PRIMARY_HOSTNAME PayloadOrganization PayloadRemovalDisallowed PayloadType Configuration PayloadUUID $(cat /proc/sys/kernel/random/uuid) PayloadVersion 1 " > "/var/lib/mailinabox/mobileconfig.xml";