# Alpha Mail — snoozed mail comes back, scheduled mail is sent, calendar reminders arrive.
#
# Every minute as www-data (it reads the Dovecot skeleton key in alpha-private and the
# per-mailbox queues in alpha-private/alphamail/x). Only mailboxes with something due
# get an IMAP connection, so an idle minute costs a few file reads.
#
# ⚠️ flock -n: a slow SMTP relay must not stack a second worker on top of the first —
# the queue is claimed atomically, but two workers would still double the connections.
* * * * * www-data /usr/bin/flock -n /run/lock/alpha-mail-worker.lock /usr/bin/nice -n 10 /usr/bin/php /var/www/alphamail/lib/worker.php >/dev/null 2>&1
