IRedMail/FAQ/Delete.Sent.Received.Mail.Log.Manually

From iRedMail
(Difference between revisions)
Jump to: navigation, search
 

Latest revision as of 01:08, 9 May 2011

Example to delete sent and received mail logs which older than 7 days:

Terminal:
$ mysql -uroot -p
mysql> USE amavisd;
mysql> DELETE FROM msgs\
              WHERE content IN ('U', 'M', 'H', 'O', 'C') \
              AND time_num < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 7 DAY));

Reference:

Personal tools