24 Aug
2013
24 Aug
'13
2:19 p.m.
I've set up both static userdb and mysql userdb and according to mysql logs it works as you described!Will move from static to sql usersdb anyway. Thanks!
Date: Sat, 24 Aug 2013 06:57:05 -0400 From: gedalya@gedalya.net To: anton.chigin@live.com CC: dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work?
I don't know, why don't you just try?
If you run the exact same command but with "search" instead of
"expunge", it should also use the expire plugin in the same way,
so that should be an easy test.
Are you using sql for passdb? If so I wonder if you could define
an sql userdb in addition to the static userdb with only an
iterate_query defined..?
On 08/24/2013 06:46 AM, Anton Chigin wrote:
So,
is enabling expire plugin the only way "doveadm expunge" to
work with static userdb, because of lack iterate_query option?
If I test it now "doveadm search" I see:
Aug 24 13:28:22 piscola dovecot: auth: Debug: Loading
modules from directory: /usr/lib/dovecot/modules/auth
Aug 24 13:28:22 piscola dovecot: auth: Debug: Module
loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Aug 24 13:28:22 piscola dovecot: auth: Debug: master in:
LIST#0111
Aug 24 13:28:22 piscola dovecot: auth: Error: Trying to
iterate users, but userdbs don't support it
userdb I have:
userdb {
args = uid=vmail gid=vmail
home=/home/mail/vhosts/%d/%n
driver = static
}
Is it OK and doveadm will not have to iterate users since
expire plugin is enabled?
Or should I still fix it to get it works properly?
Thanks a lot for your help!
Date: Sat, 24 Aug 2013 06:22:32 -0400
From: gedalya@gedalya.net
To: anton.chigin@live.com
CC: dovecot@dovecot.org
Subject: Re: [Dovecot] expire plugin doesn't work?
Yes, you add that cron job,
and it would work with or without the expire plugin.
The thing is that if the expire plugin is enabled, the
"doveadm expunge" command will look at the expires table
in mysql and only process users who are in the database
with a timestamp older than your specified message age.
The timestamp is supposed to designate "age of oldest
message in folder". Without the expires plugin, the
command would have to process every user in the system (as
per the result of the iterate query, if you're using SQL
authentication) and actually open every Trash folder and
look inside, which would normally be a lot more work and
take more time.
On 08/24/2013 06:16 AM, Anton Chigin wrote:
Hi!
Thanks for your suggestion, that moved me in to
right direction.
It was double permission issue, that I was able to
debug since changed format, and now timestaps are
added into the mysql table.
As far as I understand expire plugin only adds
timestamps to mysql table, and thats it, isn't it?
I mean I want to understand how to configure mails
to be removed...
Do I need to add to cron "doveadm
expunge -A mailbox Trash savedbefore 30d" ?
Thanks a lot!
> Date: Fri, 23 Aug 2013 21:17:34 -0400
> From: gedalya@gedalya.net
> To: dovecot@dovecot.org;
anton.chigin@live.com
> Subject: Re: [Dovecot] expire plugin doesn't
work?
>
> On 08/23/2013 09:05 PM, Anton Chigin wrote:
> > plugin {
> > expire = Trash 7
> > expire_dict = proxy::expire
>
> You're using Dovecot 2.1, that configuration
syntax is for 1.2.
> Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
>