On 25.2.2013, at 4.50, b...@bitrate.net wrote:

> i'm running doveadm search:
> 
>> doveadm search -A mailbox sent savedbefore 365d
>> 
> 
> and it's returning no results.
> 
> a similar command does return some results:
> 
>> doveadm search -A mailbox sent savedbefore 120d | grep -iF 'jdoe'
> jdoe 7b9a8b0b7d37504fe72c000055e4fe9a 65
> jdoe 7b9a8b0b7d37504fe72c000055e4fe9a 66
..
> 
> however, i see many messages in the sent mailbox much older than 365 days:

Note that Dovecot has 3 timestamps:

 * sent date : The Date: header
 * received date : In maildir the file's mtime
 * save date : In maildir either in dovecot.index.cache or the file's ctime

The idea behind save date is that it gets reset when message is copied to 
another mailbox. (So e.g. if you want to delete all mails in Trash that were 
saved there over one week ago, you wouldn't want them to be deleted immediately 
because the message was received 2 years ago.)

> i do see these older messages properly listed and viewable in my imap client. 
>  how can i figure out what i'm doing wrong, and troubleshoot why doveadm 
> doesn't seem to consider these message as matching?

Look at their save dates:

doveadm fetch -u jdoe 'date.save' all

If you want to search by received date, use "before" instead of "savedbefore".

Reply via email to