The aox vacuum message searches for obsolete database rows and deletes what can/should be deleted. This is not the same as SQL vacuum, you need to run both.
Aox vacuum permanently deletes messages undelete-time days after the time the last reference to those message are deleted. If a message is stored in two mailboxes (ie. it has two rows in the mailbox_messages table and one in the messages table) and is deleted from one mailbox, then vacuum will not touch that message yet. When the message is deleted from the other mailbox too, aox vacuum reclaims the space, and aox undelete cannot recover the message any more.
Vacuum also deletes obsolete rows from spool tables such as deliveries.
We suggest running aox vacuum daily or weekly from crontab.
If you use the -a option, vacuum also deletes all unneeded addresses. Note that this operation suspends message injection while it's running, and it can take many seconds, perhaps even minutes. We suggest running vacuum -a only by hand, never in a crontab.
If you want to know precisely what queries are executed, you can use the -v option:
aox -v vacuum aox: Dequeueing query "begin" on backend 1 … (rather complex queries) … aox: Dequeueing query "commit" on backend 1
In case of questions, please write to email@example.com.
Last modified: 2010-11-19