Last active
January 31, 2022 17:26
-
-
Save eddieh/8c853c6cf8ffb3ad87e0720eb50f8134 to your computer and use it in GitHub Desktop.
mbsync (isync) configuration for iCloud email account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: conf; tab-width: 4; -*- | |
## Passwords | |
# When using iCloud it is best to create an app-specific password | |
# | |
# https://support.apple.com/en-us/HT204397 | |
# | |
# Store application specific passwords on macOS with | |
# | |
# security add-generic-password -a account -s service -w password | |
# | |
# Where | |
# | |
# account = a name for the account (can be any arbitrary string) | |
# service = a name for the service (can be any arbitrary string) | |
# password = Apple generated password | |
## iCloud Account Config - account@me.com, account@icloud.com | |
# Notes: | |
# | |
# User | |
# | |
# The value is usually the name part of your iCloud email address | |
# (for example, emilyparker, not emilyparker@icloud.com). If your | |
# email client can't connect to iCloud using just the name part of | |
# your iCloud email address, try using the full address. | |
# | |
# PipelineDepth | |
# | |
# The value is "used to limit average bandwidth consumption (GMail | |
# may require this if you have a very fast connection)." Turns out | |
# the same is true for iCloud. There's probably some optimized value | |
# greater than "1" that can be used, but this works for me. | |
# | |
# Timeout | |
# | |
# I had an issue with timeouts. Zero means unlimited, but there's | |
# probably a better value. | |
IMAPAccount account | |
Host imap.mail.me.com | |
Port 993 | |
Timeout 0 | |
AuthMechs LOGIN | |
SSLType IMAPS | |
User account | |
PassCmd "security find-generic-password -a account -s service -w" | |
PipelineDepth 1 | |
IMAPStore account-remote | |
Account account | |
MaildirStore account-local | |
Path ~/Mail/account/ # must have the trailing "/" | |
Inbox ~/Mail/account/INBOX | |
# Notes: | |
# | |
# From the man page: By default, mbsync will not delete any messages | |
# - deletions are propagated by marking the messages as deleted on | |
# the remote store. Once you have verified that your setup works, | |
# you will typically want to set Expunge to Both, so that deletions | |
# become effective. | |
Channel account | |
Master :account-remote: | |
Slave :account-local: | |
Create Both | |
SyncState * | |
Patterns * | |
# Expunge Both |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment