IRedMail/FAQ/Delete.Quarantined.Mails.Manually

From iRedMail
Revision as of 02:05, 9 May 2011 by ZhangHuangbin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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