CYR_WITHLOCK_RUN(8)
π cyr_withlock_run π
okay bestie, welcome to the manual page for cyr_withlock_run β it's a Cyrus IMAP thing, it lives in section 8 of the manual (that's the sysadmin/system commands girlies, iykyk), and it's literally used to run system command with a lock held. β¨
π¨ WARNING: This command runs as the Cyrus user, so if you need to call something as root, the cyrus user may need sudo privileges. no cap, plan for that.
β¨ SYNOPSIS β¨
cyr_withlock_run [ -C config-file ] [ -u userid ] cmd args...
π¦ DESCRIPTION π¦
so here's the vibe: cyr_withlock_run will run the command and arguments provided on the command line, and it does that while either locking the entire server, or just a particular user, so no changes can be made to it while this command is running. locked in fr fr π
π WARNING: since this takes an exclusive lock, it will deadlock if the command tries to connect to Cyrus via IMAP/JMAP/etc and run commands that take exclusive locks. like, it will just sit there. forever. staring at you. π You can run cyrus commandline tools so long as the environment is passed through.
It is most useful for running an external filesystem snapshot command β you can run it safely, knowing that files aren't in a partial state. iconic behavior honestly π«Ά
cyr_withlock_run reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. π
π OPTIONS π
-Cconfig-file β Use the specified configuration file config-file rather than the defaultimapd.conf(5). ποΈ-u,--user<userid> β Lock just the specified userid rather than the global lock. π
π NOTE: if you run for the global lock, then your server must have theglobal_lockconfig option set, or this command will fail with an error as it can't get a guaranteed lock. noglobal_lock, no guaranteed lock, no service bestie π
π EXAMPLES π
cyr_withlock_run sleep 300
Pause all writes on the server for 300 seconds (stops any writes from getting locks). three hundred seconds of pure, uninterrupted calm. the server is meditating. π§βοΈβ¨
π FILES π
/etc/imapd.conf
πΈ ENVIRONMENT πΈ
Sets the CYRUS_HAVELOCK_GLOBAL or CYRUS_HAVELOCK_USER environment variables, to tell any called cyrus command that this lock is already held. it's like passing a note in the group chat: "we already got the lock, chill" π
π SEE ALSO π
π AUTHOR π
The Cyrus Team, Bron Gondwana
β COPYRIGHT β
1993β2026, The Cyrus Team
and that's the whole page, bestie!! π this was version 3.12.4, dated Sep 09, 2026, brought to you by the Cyrus IMAP girlies π go forth and snapshot safely, mwah π
β¨
π¦ where this page comes from
- fedora 44: cyrus-imapd 3.12.4-1.fc44 Β· BSD-Attribution-HPND-disclaimer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms