Hello,
Big surprise: Something bad must have happened after the messages were deleted from Trash; now all messages are zero days old.
Are you using maildir? Did you run with those patches + mail_debug=yes?
Today, the daily cronjob expired some messages. I have attached the output of the job.
It seems that the error occurs not when expunging, but when deleting the first message after expunging. Before deleting a message, "doveadm search" showed me messages that were between zero and four days old, but directly after deleting a message, all messages were zero days old. Here is my log entry from when I deleted that message:
Mar 18 09:50:28 joseph dovecot: imap(christoph): Debug: expire: Saving first message to Trash, updating timestamp to 1300438228
Regards Christoph