7.3 KiB
Mail And Radicale
This repo currently configures mail for billenius.com on Hermes.
Hosts
- Mail server:
mail.billenius.com - Thunderbird autoconfig:
autoconfig.billenius.com - Outlook-style autodiscover:
autodiscover.billenius.com - CalDAV/CardDAV via Radicale:
cal.billenius.com - Apple configuration profile:
https://autoconfig.billenius.com/mobileconfig/?emailaddress=love%40billenius.com - Webmail via Roundcube:
https://mail.billenius.com
Repo Locations
- Core mail settings:
modules/nixos/mail-server/mail.nix - Mail autodiscovery XML:
modules/nixos/mail-server/autodiscover.nix - Radicale and DAV discovery:
modules/nixos/mail-server/radicale.nix - Roundcube:
modules/nixos/mail-server/roundcube.nix
What The Repo Configures
- IMAP over SSL on
mail.billenius.com:993 - SMTP submission with STARTTLS on
mail.billenius.com:587 - Webmail on
https://mail.billenius.com - ACME certificates for the mail-related nginx hosts
Autodiscovery
- Thunderbird mail config at
https://autoconfig.billenius.com/mail/config-v1.1.xml - Outlook-style mail config at
https://autodiscover.billenius.com/autodiscover/autodiscover.xml - Thunderbird XML also advertises:
- CardDAV:
https://cal.billenius.com/ - CalDAV:
https://cal.billenius.com/
- CardDAV:
Radicale
- Radicale is reverse proxied on
https://cal.billenius.com/ - Authentication uses the same mail accounts and password hashes as the mail server
- DAV discovery redirects are served on:
https://mail.billenius.com/.well-known/caldavhttps://mail.billenius.com/.well-known/carddavhttps://cal.billenius.com/.well-known/caldavhttps://cal.billenius.com/.well-known/carddav
This repo does not manage the apex website host for billenius.com. If the public website should also expose DAV redirects on /.well-known/caldav and /.well-known/carddav, that has to be configured on the separate nginx host serving billenius.com.
Apple Mobileconfig
- The canonical Apple profile entrypoint is:
https://autoconfig.billenius.com/mobileconfig/?emailaddress=<url-encoded-email>
- Apple profiles are hosted from
autoconfig.billenius.com - A small landing page is available at:
https://autoconfig.billenius.com/mobileconfig/
- Account-specific profiles are always available at:
https://autoconfig.billenius.com/mobileconfig/<sanitized-email>.mobileconfig
- If there is exactly one configured mail account, the profile is also available at:
https://autoconfig.billenius.com/mobileconfig/billenius.mobileconfig
The profile configures:
- IMAP on
mail.billenius.com:993 - SMTP submission on
mail.billenius.com:587 - CalDAV on
cal.billenius.com:443 - CardDAV on
cal.billenius.com:443
Passwords are not embedded in the profile.
DNS
These records are expected for good client discovery.
Host Records
mail.billenius.comcal.billenius.comautoconfig.billenius.comautodiscover.billenius.com
cal.billenius.com, autoconfig.billenius.com, and autodiscover.billenius.com can point at the same host as mail.billenius.com.
Mail SRV
_imaps._tcp.billenius.com. SRV 0 0 993 mail.billenius.com.
_submission._tcp.billenius.com. SRV 0 0 587 mail.billenius.com.
DAV SRV/TXT
_caldavs._tcp.billenius.com. SRV 0 0 443 cal.billenius.com.
_carddavs._tcp.billenius.com. SRV 0 0 443 cal.billenius.com.
_caldavs._tcp.billenius.com. TXT "path=/"
_carddavs._tcp.billenius.com. TXT "path=/"
iOS Setup
The preferred setup path on Apple devices is to open the hosted profile in Safari:
https://autoconfig.billenius.com/mobileconfig/?emailaddress=love%40billenius.com
Install the profile, then enter the password when prompted.
The manual steps below are the fallback path.
iOS does not reliably do full self-hosted IMAP setup from the same discovery flow that Thunderbird uses. The hosted .mobileconfig profile is the best path for one-step Apple setup.
- Open
Settings - Go to
Apps->Mail->Mail Accounts->Add Account - Choose
Other - Choose
Add Mail Account - Use:
- Email: full mail address, for example
love@billenius.com - Incoming host:
mail.billenius.com - Outgoing host:
mail.billenius.com - Username: full mail address
- Password: the mail password
- Email: full mail address, for example
- iOS should use:
- IMAP SSL on
993 - SMTP submission on
587
- IMAP SSL on
Calendar
- Open
Settings - Go to
Apps->Calendar->Calendar Accounts->Add Account - Choose
Other - Choose
Add CalDAV Account - Use:
- Server:
cal.billenius.com - Username: full mail address
- Password: the mail password
- Server:
Contacts
- Open
Settings - Go to
Apps->Contacts->Contacts Accounts->Add Account - Choose
Other - Choose
Add CardDAV Account - Use:
- Server:
cal.billenius.com - Username: full mail address
- Password: the mail password
- Server:
If the goal is a single Apple setup flow that provisions mail, calendars, and contacts together, use the hosted .mobileconfig profile on autoconfig.billenius.com instead of adding the accounts manually.
Thunderbird Setup
Thunderbird should discover mail automatically from the email address alone.
- Open Thunderbird
- Add a new mail account
- Enter the email address and password
- Thunderbird should pick up
mail.billenius.comfromautoconfig.billenius.com
Contacts
Thunderbird's mail account wizard does not reliably attach CardDAV address books automatically, even when the XML, SRV/TXT records, and /.well-known endpoints exist.
The reliable path is:
- Open
Address Book - Choose
New Address Book->Add CardDAV Address Book - Use:
- Username: full mail address
- Location:
https://cal.billenius.com/
- Authenticate
- Select the discovered address books
Calendars
The reliable path is:
- Open
Calendar - Choose
New Calendar - Choose
On the Network - Use:
- Username: full mail address
- Location:
https://cal.billenius.com/
- Choose
Find Calendars - Subscribe to the discovered calendars
Verification
Thunderbird XML
curl https://autoconfig.billenius.com/mail/config-v1.1.xml
curl https://autodiscover.billenius.com/autodiscover/autodiscover.xml
DAV Well-Known
curl -I https://mail.billenius.com/.well-known/caldav
curl -I https://mail.billenius.com/.well-known/carddav
curl -I https://cal.billenius.com/.well-known/caldav
curl -I https://cal.billenius.com/.well-known/carddav
Each should return a 301 redirect to https://cal.billenius.com/.
DNS
dig +short SRV _imaps._tcp.billenius.com
dig +short SRV _submission._tcp.billenius.com
dig +short SRV _caldavs._tcp.billenius.com
dig +short SRV _carddavs._tcp.billenius.com
dig +short TXT _caldavs._tcp.billenius.com
dig +short TXT _carddavs._tcp.billenius.com
Current Limitation
The standards-based discovery in this repo is good enough for:
- Thunderbird mail autodiscovery
- DAV discovery for many clients
- manual but short setup flows on iOS and Thunderbird
It is not enough to guarantee that:
- Thunderbird's mail wizard will also attach calendars and contacts automatically
- iOS will provision mail, contacts, and calendars in one combined login flow
For that, the next likely improvement is an Apple mobileconfig profile and, if needed, client-specific setup documentation.