75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
(email_settings) {
|
|
# ---------------------------------------------------------
|
|
# 1. Autodiscover für Outlook & Android (Samsung)
|
|
# ---------------------------------------------------------
|
|
# Ersetzt den alten "respond"-Block durch die Datei-Lösung
|
|
route /autodiscover/autodiscover.xml {
|
|
# Wir setzen das Root auf deinen Setup-Ordner
|
|
root * /var/www/email-setup
|
|
|
|
# Da die URL "/autodiscover/autodiscover.xml" ist, die Datei aber
|
|
# direkt im Ordner liegt, schreiben wir den Pfad intern um:
|
|
rewrite * /autodiscover.xml
|
|
|
|
# Wichtig: Header setzen, damit Clients es als XML erkennen
|
|
header Content-Type "application/xml"
|
|
|
|
# Datei ausliefern
|
|
file_server
|
|
}
|
|
|
|
# ---------------------------------------------------------
|
|
# 2. JSON Autodiscover (Modern Outlook)
|
|
# ---------------------------------------------------------
|
|
route /autodiscover/autodiscover.json {
|
|
header Content-Type "application/json"
|
|
# Hinweis: Hier hardcoden wir eine Domain, das ist okay,
|
|
# solange das Zertifikat für autodiscover.bayarea-cc.com gilt.
|
|
respond `{
|
|
"Protocol": "AutodiscoverV1",
|
|
"Url": "https://autodiscover.bayarea-cc.com/autodiscover/autodiscover.xml"
|
|
}` 200
|
|
}
|
|
|
|
# ---------------------------------------------------------
|
|
# 3. Thunderbird Autoconfig
|
|
# ---------------------------------------------------------
|
|
route /mail/config-v1.1.xml {
|
|
header Content-Type "application/xml"
|
|
respond `<?xml version="1.0"?>
|
|
<clientConfig version="1.1">
|
|
<emailProvider id="email-srvr.com">
|
|
<displayName>Rackspace Email</displayName>
|
|
<incomingServer type="imap">
|
|
<hostname>mail.email-srvr.com</hostname>
|
|
<port>993</port>
|
|
<socketType>SSL</socketType>
|
|
<authentication>password-cleartext</authentication>
|
|
<username>%EMAILADDRESS%</username>
|
|
</incomingServer>
|
|
<outgoingServer type="smtp">
|
|
<hostname>mail.email-srvr.com</hostname>
|
|
<port>465</port>
|
|
<socketType>SSL</socketType>
|
|
<authentication>password-cleartext</authentication>
|
|
<username>%EMAILADDRESS%</username>
|
|
</outgoingServer>
|
|
</emailProvider>
|
|
</clientConfig>` 200
|
|
}
|
|
|
|
# ---------------------------------------------------------
|
|
# 4. Apple MobileConfig
|
|
# ---------------------------------------------------------
|
|
route /apple {
|
|
templates {
|
|
mime "application/x-apple-aspen-config"
|
|
}
|
|
header Content-Type "application/x-apple-aspen-config; charset=utf-8"
|
|
|
|
# Hier zeigen wir auf den Config-Ordner für das Template
|
|
root * /etc/caddy
|
|
rewrite * /email.mobileconfig.tpl
|
|
file_server
|
|
}
|
|
} |