IRedMail/FAQ/Delete.Quarantined.Mails.Manually

From iRedMail
Jump to: navigation, search

Example to delete quarnatined mails which older than 7 days:

Terminal:
$ mysql -uroot -p
mysql> USE amavisd;
mysql> DELETE FROM msgs\
              WHERE content IN ('S', 's', 'V', 'Y')\
              AND quar_type IN ('Q', 'F')\
              AND time_num < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 7 DAY));

Referrence:

Personal tools