Housekeeping
The panel's recurring work runs from one unit,
elpan-panel-scheduler.service, which sends each task to the background
workers at its time. There is exactly one scheduler; do not run a second.
The housekeeping commands run the same sweeps on demand, with a
cut-off of your own.
What is purged, and when
Every sweep below runs nightly unless said otherwise, and the command
takes --before=<date> ("-100 days", 2026-01-01) to use another
cut-off than the default.
| Command | Removes | Default |
|---|---|---|
housekeeping maildelivery purge | Mail delivery records: the rows of the email traffic log. | Older than 100 days. |
housekeeping maildeliveryattempt purge | The delivery attempts behind those records. | Older than 100 days. |
housekeeping emailrejection purge | Rejected-mail records, which follow the traffic log's window. | Older than 100 days. |
housekeeping forwarderbounce purge | Forwarding delivery failures. | Older than 180 days. |
housekeeping groupbounce purge | Group delivery failures. | Older than 180 days. |
housekeeping mailloginsource purge | Mailbox sign-in sources. | Older than 180 days. |
housekeeping credential-use purge | The address of a credential's last use; the time stays. | Older than 180 days. |
housekeeping webapplicationtask purge | Settled web application jobs beyond the most recent ones per installation (--keep). | Keeps 50. |
housekeeping webapplicationtask reap | Settles web application jobs whose worker died (--after-hours). Hourly, not nightly; Upgrade Runs has the details. | Silent for 6 hours. |
The retention of the traffic log is what an account holder sees in their Email Traffic Log; the admin app's view across accounts is Email Traffic Log.
Sweeps without a housekeeping command run on the same scheduler:
the auth log and resolved sign-in help requests after 90 days
(Auth Log), revoked API keys a week after
revocation, assistant conversations idle for two months
(AI assistant), Web Push devices unseen for a year,
expired certificates (certificate purge), the DNS error log
(dns error-log prune), mailing-list posts and spool hourly
(mailing-list housekeeping), backup tasks finished 90 days ago, TLS
reports 90 days after the day they cover, and the
nightly account purge due that queues the deletion of terminated
accounts past their grace period when automatic deletion is on
(Suspend, terminate and delete an account).
Two MTA-STS tasks are not purges but run on the same scheduler: every 15
minutes the publication sweep takes each mail domain's next step towards
the mode its holder wants, and every hour the MTA-STS policies being
turned off are withdrawn once their max_age has passed.
service mail mta-sts sweep runs both now
(Mail Transport Security).
The storage recount
Every ten minutes the scheduler re-measures the storage of up to 50 accounts: first those never measured, then the ones whose figure is more than an hour old, oldest first. The figure drives the account's storage ratio and the threshold notices to its holder.
elpanctl housekeeping account update-storage
runs the same pass now, without the delay. Accounts being purged are skipped.
Repairs
Two commands repair DNS records of websites rather than purge anything.
Neither is scheduled; both take --dry-run to report without changing
anything.
| Command | Does |
|---|---|
housekeeping website resync-records | Regenerates the A and AAAA records a website service should have and lacks. |
housekeeping website resync-https-records | Publishes the HTTPS service binding record for the HTTPS-only web hosts that lack it. |
Deleted databases a server still holds
When an account holder, an operator or an account deletion deletes a
database, the panel row goes at once, and the database and its login are
dropped from their server (PostgreSQL, MariaDB or Valkey) in a background
worker. When that server does not answer, because it is stopped, restarting
or unreachable, the database, its data and its login stay on it. The panel
keeps a record of each such removal and tries it again every minute at
first, then less often, up to once an hour, until the server answers. Each
failed attempt is a warning in the panel's log (journalctl -u 'elpan-panel-*', channel database).
elpanctl database removal list
elpanctl database removal retry
list shows every removal still waiting, with its server, the attempts
and the last error. retry tries them all now, whatever the wait; run it
once you have brought the server back, rather than wait up to an hour.
A database created again under the same name on the same server, before
the old one was dropped, is never dropped: the new database keeps the
name, and the data that was still under it. With Telemetry
enrolled, elpan_database_removals_pending and
elpan_database_removal_oldest_age_seconds show removals that wait.
See that it ran
The scheduler's journal (journalctl -u elpan-panel-scheduler.service)
has each task. With Telemetry enrolled,
elpan_scheduler_task_last_success_timestamp_seconds{task} and
elpan_scheduler_task_next_run_timestamp_seconds{task} say when every
scheduled task last succeeded and when it is next due, so a sweep that
stopped is visible from outside rather than silent.