cbpadmin is responsible for deleting old entries from the database.
The script calls cleanup functions in the following modules:
Removes old helo records from the checkhelo_tracking table.
Removes old quota records from the quotas_tracking table. Records older than 30 days are removed.
Removes old session tracking records from the session_tracking table. Records older than 24 hours are removed.
When editing a greylisting policy, there are two timers:
GreylistAuthValidity and GreylistUnAuthValidity
cbpadmin deletes authed entries after GreylistAuthValidity has expired, and unauthed ones after GreylistUnAuthValidity.
If you have these set to 7 days and 1 day and if you have an email which is successfully delivered, the tracking entry (source IP/sender/recipient) becomes authed (ie it passed the greylisting) and will not be deleted until it's 7 days old. If you have spam which fails to pass greylisting, it's unauthed, and the tracking entry will be deleted when it's more than 1 day old.
--config=/path/file Configuration file
--debug Put into debug mode
--cleanup Cleanup database records