SYNC_CLIENT(8)
π NAME π
okay so this is sync_client β it lives in section 8 of the manual, and it's part of the Cyrus IMAP documentation. it's the client side of the synchronization (replication) engine π¦ no cap.
β¨ SYNOPSIS β¨
sync_client [ -v ] [ -l ] [ -L ] [ -z ] [ -C config-file ] [ -S server-name ]
[ -f input-file ] [ -F shutdown_file ] [ -w wait_interval ]
[ -t timeout ] [ -d delay ] [ -r ] [ -n channel ] [ -u ] [ -m ]
[ -p partition ] [ -A ] [ -N ] [ -s ] [ -O ] objects...
πΈ DESCRIPTION πΈ
sync_client is, like, the client side of the whole replication situation. it runs on the client system β that's the master β and it connects over to the target system, which is the replica, and then it generates a whole appropriate sequence of transactions so the replica gets synchronized with the master. mwah π
and bestie, listen: sync_client reads its configuration options out of the imapd.conf(5) file, unless you specify otherwise with -C. that's the rule.
π OPTIONS π
-Cconfig-file β use the config file you named here (config-file) instead of the defaultimapd.conf(5). you get to pick, queen.-A,--all-usersβ All users mode. it syncs every single user on the server over to the replica. so far so good, BUT β it doesn't do non-user mailboxes at all... this could be considered a bug and maybe it should do those mailboxes independently π just saying.-ddelay,--delay=delay β the minimum delay between replication runs when you're in rolling replication mode. big values = better efficiency, because transactions can be merged. small values = the replica system is more up to date, and you don't end up with big blocks of replication transactions all glommed together as a single group. Default: 3 seconds.-finput-file,--input-file=input-file β in mailbox or user replication mode: it gives you the list of users or mailboxes to replicate. in rolling replication mode: it specifies an alternate log file (andsync_clientwill exit after it processes that log file).-Fshutdown-file,--shutdown-file=shutdown-file β rolling replication checks for this file at the end of every replication cycle, and shuts down if it's there. it's used to request a nice clean shutdown at the first convenient point. the file gets removed on shutdown. this overrides thesync_shutdown_fileoption inimapd.conf(5).-l,--verbose-loggingβ verbose logging mode. yap yap yap, but make it useful π¬-L,--local-onlyβ only do local mailbox operations (aka don't do mupdate operations). this feature was introduced in version 3.0.-m,--mailboxesβ Mailbox mode. the remaining arguments are the list of mailboxes that should be replicated.-nchannel,--channel=channel β use the named channel for rolling replication mode. if multiple channels are specified insync_log_channels, then use one of them. this option is probably best combined with-Sso you connect to a different server with each channel. β¨ strategy β¨-N,--skip-lockedβ use a non-blockingsync_lock(that's a combination of IP address and username) to skip over any users who are currently syncing. not me waiting around. we move on π-o,--connect-onceβ only attempt to connect to the backend server once.
without this option, sync_client will retry failed connections indefinitely, waiting up to sync_reconnect_maxwait (default: 20m) between attempts. so... patience of a saint, lowkey.
-O,--no-copybackβ No copyback mode. replication will stop if the replica reports a CRC error, rather than doing a full mailbox sync. super useful if you're moving users to a new server, where you don't want any errors to cause the source servers to change the account. hands off the original, periodt π«Ά-ppartition,--dest-partition=partition β in mailbox or user replication mode: this gives the name of the partition on the replica that the mailboxes/users should be replicated to.-r,--rollingβ Rolling (repeat) replication mode. it picks up a list of actions recorded by thelmtpd(8),imapd(8),pop3d(8)andnntpd(8)daemons from the file specified insync_log_file. repeat untilsync_shutdown_fileappears. alternative log and shutdown files can be specified with-fand-F.
in this invocation, sync_client will background itself to run as a daemon. main character behavior, honestly.
-R,--foreground-rollingβ same as-r, but without the backgrounding. it stays right there with you π-1,--rolling-onceβ same as-R, but it only processes a single log file before exiting. one and done, iconic.-s,--sieve-modeβ Sieve mode. the remaining arguments are the list of users whose Sieve files should be replicated. principally used for debugging purposes: not exposed tosync_client(8)π€«-Sservername,--server=servername β tellssync_clientwhich server to communicate with. this overrides thesync_hostconfiguration option.-ttimeout,--timeout=timeout β timeout for a single replication run in rolling replication.sync_clientwill negotiate a restart after this many seconds. Default: 600 seconds.-u,--useridsβ User mode. the remaining arguments are the list of users who should be replicated.-v,--verboseβ verbose mode. use it twice (-v -v) to log all protocol traffic to stderr. double it and give it to the next person π-winterval,--delayed-startup=interval β wait this long before starting. this option is typically used so we can attach a debugger to one end of the replication system or the other. π detective mode.-z,--require-compressionβ require compression. the replication protocol will always try to enable deflate compression if both ends support it. set this flag when you want to abort if compression is not available. no compression? no deal π-a,--stage-to-archiveβ request the stage-to-archive feature. if the remote end has thearchive_enabledoption set, then it will stage incoming replication on the archive partition instead of the spool partition. if the remote end does not support it, replication will proceed as though-awas not provided. this option is useful when standing up a new replica of an existing server, since most of the stored mail is likely older than the archive threshold, and so is destined for the archive partition anyway. by staging on that partition, Cyrus can avoid a cross-partition copy for every single message. efficiency ate π₯
π EXAMPLES π
on a replication master, the following would be added to the START section of cyrus.conf(5):
syncclient cmd="/usr/lib/cyrus/bin/sync_client -r"
[NB: More examples needed] β bestie the docs said it, not me π
π¦ HISTORY π¦
the -L feature, local updates only, was added in version 3.0.
π FILES π
/etc/imapd.conf<configdirectory>/sync/skipuser-<user>β if this file exists, the user will not be replicated<configdirectory>/sync/<channel>/skipuser-<user>β if this file exists, the user will not be replicated for that channel
π« SEE ALSO π«
sync_server(8), cyrus.conf(5), imapd.conf(5), master(8)
go read those too, iykyk π
π AUTHOR π
The Cyrus Team, David Carter (dpc22@cam.ac.uk), Ken Murchison (ken@oceana.com), Nic Bernstein (Onlight)
β COPYRIGHT β
1993β2026, The Cyrus Team
okay that's the whole thing, you're so welcome π«Ά this was Cyrus IMAP version 3.12.3, dated Jul 15, 2026, and yeah it's SYNC_CLIENT(8) in section 8. slay, go replicate something π
β¨
π¦ where this page comes from
- ubuntu stonking: cyrus-replication 3.12.3-3build1 Β· CMU
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms