apple
This commit is contained in:
parent
c73b400f52
commit
eec4458604
|
|
@ -19,6 +19,7 @@ services:
|
|||
volumes:
|
||||
- $PWD/Caddyfile:/etc/caddy/Caddyfile
|
||||
- $PWD/email_autodiscover:/etc/caddy/email_autodiscover
|
||||
- $PWD/email.mobileconfig.tpl:/etc/caddy/email.mobileconfig.tpl
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
- /home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser:/home/aknuth/git/bizmatch-project/bizmatch/dist/bizmatch/browser
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PayloadContent</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>EmailAccountDescription</key>
|
||||
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>EmailAccountName</key>
|
||||
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>EmailAccountType</key>
|
||||
<string>EmailTypeIMAP</string>
|
||||
<key>EmailAddress</key>
|
||||
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>IncomingMailServerAuthentication</key>
|
||||
<string>EmailAuthPassword</string>
|
||||
<key>IncomingMailServerHostName</key>
|
||||
<string>mail.email-srvr.com</string>
|
||||
<key>IncomingMailServerPortNumber</key>
|
||||
<integer>993</integer>
|
||||
<key>IncomingMailServerUseSSL</key>
|
||||
<true/>
|
||||
<key>IncomingMailServerUsername</key>
|
||||
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>OutgoingMailServerAuthentication</key>
|
||||
<string>EmailAuthPassword</string>
|
||||
<key>OutgoingMailServerHostName</key>
|
||||
<string>mail.email-srvr.com</string>
|
||||
<key>OutgoingMailServerPortNumber</key>
|
||||
<integer>465</integer>
|
||||
<key>OutgoingMailServerUseSSL</key>
|
||||
<true/>
|
||||
<key>OutgoingMailServerUsername</key>
|
||||
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>PayloadDescription</key>
|
||||
<string>E-Mail Konfiguration für {{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>PayloadDisplayName</key>
|
||||
<string>{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>PayloadIdentifier</key>
|
||||
<string>com.email-srvr.profile.{{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>PayloadType</key>
|
||||
<string>com.apple.mail.managed</string>
|
||||
<key>PayloadUUID</key>
|
||||
<string>{{uuidv4}}</string>
|
||||
<key>PayloadVersion</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>PayloadDescription</key>
|
||||
<string>Automatische E-Mail Einrichtung für {{.Req.URL.Query.Get "email"}}</string>
|
||||
<key>PayloadDisplayName</key>
|
||||
<string>E-Mail Einstellungen</string>
|
||||
<key>PayloadIdentifier</key>
|
||||
<string>com.email-srvr.profile.root</string>
|
||||
<key>PayloadOrganization</key>
|
||||
<string>IT Support</string>
|
||||
<key>PayloadRemovalDisallowed</key>
|
||||
<false/>
|
||||
<key>PayloadType</key>
|
||||
<string>Configuration</string>
|
||||
<key>PayloadUUID</key>
|
||||
<string>{{uuidv4}}</string>
|
||||
<key>PayloadVersion</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -77,4 +77,19 @@
|
|||
</emailProvider>
|
||||
</clientConfig>` 200
|
||||
}
|
||||
|
||||
# NEU: Apple MobileConfig Route
|
||||
# Aufrufbar über: /apple?email=kunde@domain.de
|
||||
route /apple {
|
||||
# Wichtig: Templates aktivieren, damit Caddy die Platzhalter ersetzt
|
||||
templates
|
||||
|
||||
# Den richtigen MIME-Type setzen, damit das iPhone es als Profil erkennt
|
||||
header Content-Type "application/x-apple-aspen-config; charset=utf-8"
|
||||
|
||||
# Die Datei ausgeben (Pfad ggf. anpassen!)
|
||||
# Wenn die .tpl Datei im selben Ordner wie das Caddyfile liegt:
|
||||
rewrite * /email.mobileconfig.tpl
|
||||
file_server
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue