How to delete email before 2014.12.31?

sadasan

Active Member
Feb 10, 2015
34
2
8
cPanel Access Level
Root Administrator
Hello,

cPanel has the function of email disk usage with ver.64.

I want to delete the emails(imap) that the date is before 2014.12.31.
Then I have to execute "Custom query".

How should I write in the box at the custom query?
I read the devecot documentation, but could not find the way.

Please advise me.

Thank you.
 

Attachments

rpvw

Well-Known Member
Jul 18, 2013
1,088
446
113
Spain
cPanel Access Level
Root Administrator
From the dovecot docs, I would think the following code would do the trick
Code:
savedbefore 2014-12-31
This is built using the
SAVEDBEFORE date specification
Matches messages, which were saved before date specification.
and the
Date Specification
doveadm(1) supports a few additional date specification formats. They can be used anywhere, where a date specification value is obligatory.

day-month-year
Default IMAP4rev1 date format.
day, the day of month: 1-31.
month, the abbreviated month name: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov or Dec.
year, four digits of year, e.g. 2007.
For example the "13th of April 2007" will be represented as 13-Apr-2007.
interval
Combination of a positive integer number and a time unit.
Available time units are: weeks (abbr: w), days (abbr: d), hours (abbr: h), mins (abbr: m) and secs (abbr: s).
To match messages from last week, you may specify for example: since 1w, since 1weeks or since 7days.
Unix timestamp
A 10 digit Unix timestamp, seconds since the 1st of January 1970, 00:00:00 UTC. For example the "13th of April 2007" will be represented as 1176418800.
YYYY-MM-DD
Extended ISO-8601 calendar date format. For example the "13th of April 2007" will be represented as 2007-04-13.
Do let us know if it works :)
 
  • Like
Reactions: cPanelMichael