/usr/sbin/cyrus is in cyrus-common 2.4.17+nocaldav-0+deb8u2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | #!/bin/sh
MYNAME=cyrus
CYRUS_BINPATH=/usr/lib/cyrus/bin
usage() {
cat <<EOF
usage: ${MYNAME} COMMAND [ARGS]
The most commonly used cyr commands are:
reconstruct reconstruct mailboxes
quota report and optionally fix quota usage
squatter reindex mailboxes
mbpath translate mailbox names to filesystem paths
mboxlist perform operations on the mailbox list database
check perform a consistency check of the cyrus mailstore
tls_prune prune expired sessions from the TLS sessions database
ctl_cyrusdb perform operations common to all Cyrus databases
expire expire messages and duplicate delivery database entries
arbitron arbitron mailboxes
cvt_cyrusdb convert a database file between cyrus database formats
arbitronsort sorts arbitron(8) output
ipurge delete mail from IMAP mailbox or partition based on age or size
makedirs Sets up the Cyrus IMAPd system directories (spools)
You can get manpages for respective command by prepending cyrus-
prefix to the command name, f.e.:
man 8 cyrus-reconstruct
EOF
exit 1
}
RUNNAME="$(basename "${0}")"
case "$(basename ${0})" in
"${MYNAME}")
[ -z "${1}" ] && {
echo "ERROR: Command cannot be empty"
echo
usage
}
COMMAND="${1}"
shift
;;
cyrreconstruct|cyrquota)
COMMAND="${RUNNAME#cyr}"
;;
cyrus-makedirs)
COMMAND=${RUNNAME#cyrus-}
;;
*)
COMMAND="${RUNNAME}"
;;
esac
[ -z "${COMMAND}" ] && usage
case "${COMMAND}" in
help|--help)
if [ -n "${1}" ]; then
exec man ${1}
else
usage
fi
exit 1
;;
esac
if [ ! -f "${CYRUS_BINPATH}/${COMMAND}" ]; then
if [ -f "${CYRUS_BINPATH}/cyr_${COMMAND}" ]; then
COMMAND="cyr_${COMMAND}"
elif [ -f "${CYRUS_BINPATH}/ctl_${COMMAND}" ]; then
COMMAND="ctl_${COMMAND}"
elif [ "${COMMAND}" = "check" ]; then
COMMAND="chk_cyrus"
else
echo "ERROR: ${COMMAND}: Unknown command or command not installed"
echo
usage
fi
fi
exec "${CYRUS_BINPATH}/${COMMAND}" "${@}"
|