The idea is to delete only logs that are few months older.
Actually, you know what, open /apps/console/commands/DailyCommand.php and look for:
PHP:
protected function deleteDeliveryServersUsageLogs()
{
try {
$connection = Yii::app()->getDb();
$connection->createCommand('DELETE FROM `{{delivery_server_usage_log}}` WHERE date_added < DATE_SUB(NOW(), INTERVAL 1 YEAR)')->execute();
} catch (Exception $e) {
Yii::log($e->getMessage(), CLogger::LEVEL_ERROR);
}
return $this;
}
and make it
PHP:
protected function deleteDeliveryServersUsageLogs()
{
try {
$connection = Yii::app()->getDb();
$connection->createCommand('DELETE FROM `{{delivery_server_usage_log}}` WHERE date_added < DATE_SUB(NOW(), INTERVAL 3 MONTH)')->execute();
} catch (Exception $e) {
Yii::log($e->getMessage(), CLogger::LEVEL_ERROR);
}
return $this;
}
That way you delete logs older than 3 months, automatically, each day. I also adjsuted the core app to do like so, so the change is safe for updates.
It's the cron jobs more than sure, see
https://kb.mailwizz.com/articles/my-campaigns-dont-send-theyre-stuck-in-pending-sending-status/ and
https://kb.mailwizz.com/articles/debug-send-campaigns-command/