# Blog newsletter: drain the public sign-up spool.
#
# The public site cannot verify a mailbox or write to the subscriber database —
# it is a printer with one PHP entry point and no panel code. So it appends
# sign-ups, confirmations and unsubscribes to a spool file, and this drains it.
#
# ⚠️ Without this cron the sign-up form still ACCEPTS addresses and tells the
# visitor they are on the list, and nothing ever happens to them. That is the
# worst failure mode a newsletter has, so verify.sh asserts this file exists.
#
# flock -n: verification is an SMTP conversation per address and a batch can
# outlive a minute, so an overlapping run is skipped rather than queued.
* * * * * www-data /usr/bin/flock -n /run/lock/alpha-newsletter.lock /usr/bin/php /var/www/alpha/bin/newsletter-worker.php >/dev/null 2>&1
