Skip to main content

How to delete email before 2014.12.31?

Comments

6 comments

  • rpvw
    From the dovecot docs, I would think the following code would do the trick
    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 :)
    0
  • cPanelMichael
    Hello, The previous post should help. Let us know if you have additional questions. Thanks!
    0
  • stormy
    I've been trying "savedbefore 2018-01-01" and it's not working for me. I've tried several different date formats just in case. I get a success message but no emails are deleted. EDIT: searching around, the command that works for me is "sentbefore 01-Jan-2018". The date format is not important, but SENTBEFORE instead of SAVEDBEFORE is the key. Maybe the interface should be updated, the example listed there is "savedbefore 2weeks".
    0
  • cPRex Jurassic Moderator
    @stormy - is it possible the account was migrated to your machine at some point since 2018?
    0
  • stormy
    Yes, it was moved between cPanel servers. Good catch!
    0
  • cPRex Jurassic Moderator
    I'm guessing that's the issue since I've seen that come up before - the timestamp on the messages gets altered as part of the transfer, so it doesn't "see" the original date the message was created.
    0

Please sign in to leave a comment.