mbsync(1) User Commands mbsync(1) (NAME) mbsync - IMAP4 Maildir (SYNOPSIS) mbsync [options ...] {{channel[:box[{,|\n}...]]|group} ...|-a} mbsync --list-stores [options ...] [store ...] (DESCRIPTION) mbsync Maildir IMAP4 . (flags) . (UID) ( ). mbsync UID ( UID validity) ( ). mbsync . mbsync ( INHERENT PROBLEMS ). . (OPTIONS) -c, --config file file. $XDG_CONFIG_HOME/isyncrc ~/.mbsyncrc . $XDG_CONFIG_HOME ~/.config . -a, --all Channel . Channel/Group . -l, --list Channel . -ls, --list-stores Store . Store . Store Patterns Channel . Store . -C[f][n], --create[-far|-near] Create . . -R[f][n], --remove[-far|-near] Remove . . -X[f][n], --expunge[-far|-near] Expunge . . {-n|-o|-u|-g|-f|-0|-F}, {--new|--old|--upgrade|--gone|--flags|--noop|--full} {-L|-H}[n][o][u][g][f], {--pull|--push}[-new|-old|-upgrade|-gone|-flags] Sync . . -h, --help . -v, --version . -y, --dry-run : Channel . -e, --ext-exit : far near push pull . pull . -V, --verbose (verbose) . -D[C][d|D][m][M][n|N][s]], --debug[-crash|-driver|-driver- all|-maildir|-main|-net|-net-all|-sync] : C, crash - (built-in crash handler) d, driver - ( ) D, driver-all - ( ) m, maildir - maildir M, main - main n, net - ( ) N, net-all - ( /payloads) s, sync - crash verbose . net-all . -q, --quiet ( TTY ) . . mbsync . (#) . (") (\) (escape) . ( ) . Bash (~) . . . . . : Stores Channels. Store . Channel Store . : Accounts Groups. Account Store Store . Group Channel . ( Path Inbox) Store . . Store (All Stores) Store . <>> (opposite Store) Store Channel . INBOX Store Store . Path path Store (). Store . Store Patterns Create Channels . . (: none) MaxSize size[k|m][b] size Store . . (flag) Upgrade . : Store ( ) . . K M . B . size 0 unlimited () . (: 0) MapInbox mailbox ( Path) INBOX . Patterns Channels Maildir Inbox Path . . Flatten delim Store / delim () . MUA Store Mutt . . . INBOX Path <>. Trash mailbox ( Path) (expunging) . RECOMMENDATIONS INHERENT PROBLEMS . (: none) TrashNewOnly yes|no . Store Trash ( TrashNewOnly no). (: no) TrashRemoteNew yes|no Store Trash Store . Store Trash . (: no) Store Maildir (Maildir Stores) Path . mbsync UID UID Maildir mbsync . native Maildir c-client pine . UID .uidvalidity UID . alternative UID 0.8 0.9.x isync . Berkeley .isyncuidmap.db UID . native (endianness) << >> UID UID . alternative MUA mbsync . Mutt . mdconvert . MaildirStore name Maildir name . AltMap yes|no UID alternative Store. UID mdconvert . RECOMMENDATIONS . (: no) Inbox path INBOX. Path INBOX Path . (: ~/Maildir) InfoDelimiter delim (info) . Maildir DOS/Windows . (: FieldDelimiter) SubFolders Verbatim|Maildir++|Legacy . Flatten . top/sub/subsub INBOX/sub/subsub : Verbatim - Path/top/sub/subsub Inbox/sub/subsub ( ) Maildir++ - Inbox/.top.sub.subsub Inbox/..sub.subsub ( Courier Dovecot - ). Path . Legacy - Path/top/.sub/.subsub Inbox/.sub/.subsub ( mbsync ) (: ) IMAPAccount name IMAP4 name . Host host DNS IP IMAP . Tunnel TLSType None CertificateFile (subject) . Port port TCP IMAP . (: 143 IMAP 993 IMAPS) Tunnel . Timeout timeout IMAP . . (: 20) User username IMAP . UserCmd [+]command . . stdout . + TTY ( ) . (escape) . Pass password username IMAP . . mbsync . PassCmd [+]command . (agents) . UserCmd . UseKeychain yes|no macOS Keychain . (: no) keychain : security add-internet-password -r imap -s Host -a User -w password [ -T /path/to/mbsync ] Tunnel command TCP . IMAP SSH . AuthMechs type ... . SASL ( ) LOGIN IMAP . * TLSType . SASL . (: *) TLSType {None|STARTTLS|IMAPS} / : None - . Tunnel . STARTTLS - STARTTLS 143 IMAP . ( ). IMAPS - TLS 993 IMAP . TLSVersions {+|-}{1.0|1.1|1.2|1.3} ... TLS / / . . OpenSSL mbsync . (: 1.2 ). SystemCertificates yes|no CA ( ) . . (: yes) CertificateFile path X.509 . : Host . . . mbsync-get-cert (fingerprint) ( ). CA (trust anchors) . SystemCertificates . . ClientCertificate path . ClientKey . . ClientKey path ClientCertificate. CipherString string (cipher string) OpenSSL TLS 1.2 ( 1.3 ) . ciphers(1) . (: ). PipelineDepth depth IMAP . 1 (pipelining) . ( GMail ) M$ Exchange . (: unlimited) DisableExtension[s] extension ... IMAP . ( mbsync) . (: ) Path (server) $HOME $HOME/Mail . INBOX . IMAPStore name IMAP4 name . Account account account IMAP4 . Account Account Store - Account Store . UseNamespace yes|no NAMESPACE <<>> . IMAP . Path . (: yes) PathDelimiter delim . (: NAMESPACE <<>> ) . Flatten . SubscribedOnly yes|no IMAP (subscribed) . mbsync IMAP LSUB LIST Store . Patterns . (: no) (Channels) Channel name name . {Far|Near} :store:[mailbox] (far) (near) Channel . Patterns mailbox . mailbox INBOX . Pattern[s] [!]pattern ... pattern() . . IMAP4 * % . ! () . ( Pattern) . INBOX (wildcards) Path . Patterns Channel ( Group ) (override) . : "Patterns % !Trash" MaxSize size[k|m][b] Stores Far Near . Stores Stores Channel . MaxMessages count (near) . ( ). ( ) . ( ) ( ) . count 0 (unlimited) ( : 0). ExpireUnread yes|no MaxMessages . . . MaxMessages . . ( : no). ExpireSide Far|Near MaxMessages . ( : Near). Sync {None|[Pull] [Push] [New] [Old] [Upgrade] [Gone] [Flags] [Full]} () : Pull - . Push - . New - . Old - . () . Upgrade - (placeholders) . MaxSize . Gone - . (expunged) . Store Store (expunge) . Flags - . Deleted/Trashed mutt maildir_trash . Full - "New Upgrade Gone Flags". . None ( --noop ) - . (expunge) . Pull Push New Old Upgrade Gone Flags . ( ) . . : / . . Full . "Sync Pull New Flags" "Sync New Gone" "Sync Push" . . / ( Old). "Sync PullNew PullGone Push" ( ) . "Sync PullNew Pull" "Sync PullNew Gone Push" . None . Create {None|Far|Near|Both} [ /]. . ( : None) Remove {None|Far|Near|Both} [ /]. . MailDir cur/ . SyncState * . . ( : None) Expunge {None|Far|Near|Both} [ /] . ExpungeSolo () . RECOMMENDATIONS . ( : None) ExpungeSolo {None|Far|Near|Both} [ /] Store . Sync Gone (expunges) . . IMAP UIDPLUS . Expunge . ( : None) CopyArrivalDate {yes|no} () . . IMAP ( internal date ) . ( : no) Sync Create Remove Expunge ExpungeSolo MaxMessages ExpireUnread ExpireSide CopyArrivalDate . Channel . SyncState {*|path} Channel . * .mbsyncstate (near side) Maildir . . . . : :far-store:far-box_:near-store:near-box ( FieldDelimiter ). ( : $XDG_STATE_HOME/isync/ ~/.mbsync/ . $XDG_STATE_HOME ~/.local/state .) (Groups) Group name [channel[:box[,...]]] ... name . Groups Channel <<>> . Channel . box channel Patterns Channel . . Channel[s] channel[:box[,...]] ... Channel Group. Group . (Global Options) FSync yes|no mbsync (forced flushing) . data=ordered (mount) . data=writeback ext4 btrfs xfs. . (: yes) FieldDelimiter delim SyncState . mbsync (:) DOS/Windows . SyncState * . InfoDelimiter . ( : ; : ) BufferLimit size[k|m][b] Channel mbsync . . (: 10M) (CONSOLE OUTPUT) mbsync . : C: 1/2 B: 3/4 F: +13/13 *23/42 #0/0 -0/0 N: +0/7 *0/0 #0/0 -0/0 Channel (boxes) (far) (near) . (expunged) . . (redirection) mbsync (quiet) . (RECOMMENDATIONS) IMAP (auto-expunge) - . Gmail . mbsync - Store . Expunge Both . mbsync mbsync . Store ( IMAP ) . mbsync (MUA) ( maildir_trash Mutt). . TrashNewOnly TrashRemoteNew . ( Gmail ) mbsync . Trash mbsync . Trash M$ Exchange 2013 DisableExtension MOVE . UID MUA Maildir . Mutt mu4e : (setq mu4e-change-filenames-when-moving t) ,U=xxx . mbsync mbsync . Trash IMAP UIDPLUS ( M$ Exchange ) (race condition) : (expunge) . ( mbsync) IMAP . (FILES) $XDG_CONFIG_HOME/isyncrc ( ~/.config/isyncrc) . . $XDG_STATE_HOME/isync/ ( ~/.local/state/isync/) . ~/.mbsyncrc (Legacy). ~/.mbsync/ . (SEE ALSO) mdconvert(1), mutt(1), maildir(5) mbsync http://isync.sf.net . SASL : http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml (AUTHORS) Michael R. Elkins Oswald Buddenhagen AUTHORS . isync 1.5.1 2025-08-11 mbsync(1)