[Dovecot] Problem with expire plugin and expunge

Christoph Pleger Christoph at plmail.de
Mon Feb 28 20:56:40 EET 2011


Hello,

How can I look at the timestamps? By opening my database with sqlite3 and then 
enter "select * from expires;"? I did that and it showed:

christoph|Trash|1298917682

How can I check if this timestamp is correct? It is not really human readable.

> doveadm fetch -u user at domain date.saved mailbox Trash 1

This tells me:

date.saved: 2011-02-23 18:44:16

But 'doveadm search' shows me no messages older than zero days, see below.



For testing, I have set the expunge interval to five days, that means that 
messages are to be deleted five days after they have been moved to Trash. 
Today, this became true for the first time and I have the same problem as 
before: The oldest messages have been deleted, but newer messages, which have 
been four, three, two or one days old before (due to 'doveadm search') are 
now all zero days old.

Surprisingly, I did not even get output from the cron job. On the other days, 
I got:


/etc/cron.daily/dovecot:
doveadm: Debug: Loading modules from directory: /usr/lib/dovecot/modules
doveadm: Debug: Module loaded: /usr/lib/dovecot/modules/lib20_expire_plugin.so
doveadm: Debug: Loading modules from 
directory: /usr/lib/dovecot/modules/doveadm
doveadm: Debug: Module 
loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so
doveadm: Debug: Skipping module doveadm_quota_plugin, because dlopen() 
failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: 
undefined symbol: quota_user_module (this is usually intentional, so just 
ignore this message)
doveadm: Debug: Skipping module doveadm_zlib_plugin, because dlopen() 
failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so: 
undefined symbol: i_stream_create_deflate (this is usually intentional, so 
just ignore this message)
doveadm: Debug: expire: Searching only users listed in expire database

doveadm: Debug: expire: Stopping iteration on key 
shared/expire/christoph/Trash (1298413406 > 1298360493)
doveadm: Debug: Loading modules from directory: /usr/lib/dovecot/modules
doveadm: Debug: Module loaded: /usr/lib/dovecot/modules/lib20_expire_plugin.so
doveadm: Debug: Loading modules from 
directory: /usr/lib/dovecot/modules/doveadm
doveadm: Debug: Module 
loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so
doveadm: Debug: Skipping module doveadm_quota_plugin, because dlopen() 
failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: 
undefined symbol: quota_user_module (this is usually intentional, so just 
ignore this message)
doveadm: Debug: Skipping module doveadm_zlib_plugin, because dlopen() 
failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so: 
undefined symbol: i_stream_create_deflate (this is usually intentional, so 
just ignore this message)
doveadm: Debug: expire: Searching only users listed in expire database
doveadm: Debug: expire: Stopping iteration on key 
shared/expire/christoph/Trash (1298413406 > 1298360493)


But it is possible that I did not receive output because I was just shutting 
down the computer, because my mail system is still in a test phase and I do 
not yet have a hardware which I can use exclusively for the mail server.

Is it possible that expire/expunge works only if the mailbox is in maildir 
format, with every mail in a single file? I am using mdbox right now.

Best regards
  Christoph
  

On Tuesday, 22 February 2011 10:07:40 Timo Sirainen wrote:

> On Sat, 2011-02-19 at 10:10 +0100, Christoph Pleger wrote:
> > I started to use the expire plugin about one month ago. Since then,
> > using "doveadm search -A mailbox Trash savedbefore <days>" with different
> > values for <days>, I could see every day how the messages were getting
> > older. Yesterday was the first time that the expression "savedbefore 30d"
> > became true for the oldest messages in the Trash mailbox and these
> > messages were actually deleted from Trash. But today, all messages that
> > were not deleted yesterday are new to "doveadm search", that means that
> > "doveadm search -A mailbox Trash savedbefore 0d" shows all messages from
> > Trash, but "doveadm search -A mailbox Trash savedbefore 1d" shows no
> > messages from Trash, though during the last month I moved messages to
> > Trash every day.
>
> Are the timestamps wrong in the database? They should contain the
> timestamp of the oldest save-date of message in the mailbox.
>
> Also check that the save-dates are as expected in the mailbox itself:
>
> doveadm fetch -u user at domain date.saved mailbox Trash 1
>
> And finally, I added some more helpful error and debug logging (which
> you'll get with doveadm -D):
> http://hg.dovecot.org/dovecot-2.0/raw-rev/9862e8388a1c




More information about the dovecot mailing list