1 min read

Set up Mutt with Custom iCloud Domains

It's a bit tricky to set the Mutt with iCloud since there's no documentation available for custom domains and their IMAP/SMTP settings. However, what Apple does, is to authenticate you through your iCloud e-mail (@icloud.com) and change the 'FROM' section of the mail when sending. Maybe that's also the reason why we can have all @customdomain sub-mails.

Here's the neccessary and basit ~/.muttrc file:

# --- User Variables
set realname = "{SENDER_NAME}"
set from = "{YOUR_CUSTOM_EMAIL}"
set imap_user = "{YOUR_ICLOUD_E_MAIL}@icloud.com"
set imap_pass = "{YOUR_APP_PASSWORD}"
set smtp_pass = "{YOUR_APP_PASSWORD}"

# --- Connection Settings ---
# Incoming Mail (IMAP)
set folder = "imaps://imap.mail.me.com:993"
set spoolfile = "+INBOX"
set postponed = "+Drafts"
set record = "+Sent Messages"

# Outgoing Mail (SMTP)
# Note: The SMTP URL must include your username/email
set smtp_url = "smtp://[email protected]:587/"

# --- Security & Optimization ---
set ssl_force_tls = yes
set ssl_starttls = yes
set smtp_authenticators = "login"

# --- Basic UI Tweaks (Optional) ---
set sort = threads
set sort_aux = reverse-last-date-received
set editor = "nvim"

Make sure to get your app pasword from accounts.apple.com!

Have fun!