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 πŸ‘‘

  • -C config-file β€” use the config file you named here (config-file) instead of the default imapd.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.
  • -d delay, --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.
  • -f input-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 (and sync_client will exit after it processes that log file).
  • -F shutdown-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 the sync_shutdown_file option in imapd.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.
  • -n channel, --channel=channel β€” use the named channel for rolling replication mode. if multiple channels are specified in sync_log_channels, then use one of them. this option is probably best combined with -S so you connect to a different server with each channel. ✨ strategy ✨
  • -N, --skip-locked β€” use a non-blocking sync_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 🫢
  • -p partition, --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 the lmtpd(8), imapd(8), pop3d(8) and nntpd(8) daemons from the file specified in sync_log_file. repeat until sync_shutdown_file appears. alternative log and shutdown files can be specified with -f and -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 to sync_client(8) 🀫
  • -S servername, --server=servername β€” tells sync_client which server to communicate with. this overrides the sync_host configuration option.
  • -t timeout, --timeout=timeout β€” timeout for a single replication run in rolling replication. sync_client will 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 😭
  • -w interval, --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 the archive_enabled option 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 -a was 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)


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