Re: [Dovecot] Expire plugin - empty expires table
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 8 Dec 2013, Peter Šori wrote: Dovecot does not fill expires table when moving messages to Trash or Junk folder. I don't use expire, but: http://wiki2.dovecot.org/Plugins/Expire disagrees with # 2.2.6: /etc/dovecot/dovecot.conf [...] plugin { expire = Trash 1 Trash.* 1 Junk 2 looks like this is Dovecot v1 syntax. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUqV6ZF3r2wJMiz2NAQJNPwgAmNBMiNmeyTCn5BjB44dLqq3M3vJLHkji YTSKhYTd5twiskFI06CeDql5l+uBcGc5vfH5SKTIg/2zjvUJwpR/vIfBmM3U+ZNq YphEfT/V6+oVWUeEERBjw7v7eT3IgG8do7cZ4/EHGNScRB8bBTHTUzNbpPWVSo+U RlER9OqspBD7hLJCc1P8jZ7vCNV0LT8/T1hdx1HGRFJnrvH8FsXiwKTekxs2868B HYNy6iF+zLtZJDoOUUVvZ3w8CkU96T5njZC8YxosOBiAanykadoLCdnwOq+h91VG qgpaFRz6m4oABgIuENHntNjGL9PhPB5eebR4YDdMStpKBsi0UDHG8Q== =VDz7 -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin - empty expires table
Embarrassment at its best :) Working conf: plugin { expire = Trash expire2 = Trash/* expire3 = Spam } First testing was done with 2.x syntax and it seems I had something else wrong then -- later on I just assumed the wiki syntax must be wrong, as I struggled for whole day with combinations. Thanks for help Steffen. -Original Message- From: Steffen Kaiser [mailto:skdove...@smail.inf.fh-brs.de] Sent: Monday, December 9, 2013 9:08 AM To: Peter Šori Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Expire plugin - empty expires table -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 8 Dec 2013, Peter Šori wrote: Dovecot does not fill expires table when moving messages to Trash or Junk folder. I don't use expire, but: http://wiki2.dovecot.org/Plugins/Expire disagrees with # 2.2.6: /etc/dovecot/dovecot.conf [...] plugin { expire = Trash 1 Trash.* 1 Junk 2 looks like this is Dovecot v1 syntax. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUqV6ZF3r2wJMiz2NAQJNPwgAmNBMiNmeyTCn5BjB44dLqq3M3vJLHkji YTSKhYTd5twiskFI06CeDql5l+uBcGc5vfH5SKTIg/2zjvUJwpR/vIfBmM3U+ZNq YphEfT/V6+oVWUeEERBjw7v7eT3IgG8do7cZ4/EHGNScRB8bBTHTUzNbpPWVSo+U RlER9OqspBD7hLJCc1P8jZ7vCNV0LT8/T1hdx1HGRFJnrvH8FsXiwKTekxs2868B HYNy6iF+zLtZJDoOUUVvZ3w8CkU96T5njZC8YxosOBiAanykadoLCdnwOq+h91VG qgpaFRz6m4oABgIuENHntNjGL9PhPB5eebR4YDdMStpKBsi0UDHG8Q== =VDz7 -END PGP SIGNATURE- smime.p7s Description: S/MIME cryptographic signature
Re: [Dovecot] Expire plugin and databases
You need something, sqlite is perhaps your lightest option. You need to store the expire data somewhere.. http://wiki2.dovecot.org/Plugins/Expire On 12/05/2013 04:51 PM, Mauricio Tavares wrote: Dumb question: do I need to have a database to run the expire plugin?
Re: [Dovecot] expire plugin doesn't work?
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: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@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
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: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@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
Re: [Dovecot] expire plugin doesn't work?
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/authAug 24 13:28:22 piscola dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.soAug 24 13:28:22 piscola dovecot: auth: Debug: master in: LIST#0111Aug 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: geda...@gedalya.net To: anton.chi...@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: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@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
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: geda...@gedalya.net To: anton.chi...@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: geda...@gedalya.net mailto:geda...@gedalya.net To: dovecot@dovecot.org mailto:dovecot@dovecot.org; anton.chi...@live.com mailto:anton.chi...@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
Re: [Dovecot] expire plugin doesn't work?
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: geda...@gedalya.net To: anton.chi...@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: geda...@gedalya.net To: anton.chi...@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: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@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
Re: [Dovecot] expire plugin doesn't work?
Oh cool. Nice to hear. Remember to take a look at the prefetch http://wiki2.dovecot.org/UserDatabase/Prefetch , it saves you an extra query in cases where authentication took place before userdb lookup. On 08/24/2013 07:19 AM, Anton Chigin wrote: 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: geda...@gedalya.net To: anton.chi...@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: geda...@gedalya.net mailto:geda...@gedalya.net To: anton.chi...@live.com mailto:anton.chi...@live.com CC: dovecot@dovecot.org mailto: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: geda...@gedalya.net mailto:geda...@gedalya.net To: dovecot@dovecot.org mailto:dovecot@dovecot.org; anton.chi...@live.com mailto:anton.chi...@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
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
Re: [Dovecot] Expire plugin with multiple mail servers
Hello, I have configured mysql on one server and each mail server use this database for expire plugin. I have configured each mail server as explains on:http://wiki2.dovecot.org/Plugins/Expire But now I have a question; How i configure director server to use the database? I need to configure expire plugin on the director server? thanks in advance. -- Ramon Frontera Gallardo Universitat de les Illes Balears El 11/09/2012, a las 15:34, Timo Sirainen escribió: On 11.9.2012, at 12.41, Ramón Frontera wrote: Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. The backend servers need to be the ones actually doing the expunges. Director servers are the only ones that know which backend server to run each expunge on. Expire plugin works by limiting the users iterated by doveadm expunge -A, which is run on director. So the director server where you run this command needs to have access to the full expire database. This pretty much means one shared SQL server between all servers.
Re: [Dovecot] Expire plugin with multiple mail servers
Am 11.09.2012 11:41, schrieb Ramón Frontera: Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. I don't know if the database should be in one proxy, and I don't know which server has to do the doveadm expunge command Do you have any idea how is the best way to configure expire plugin on this scenario? Thanks in advance. -- Ramon Frontera Gallardo Universitat de les Illes Balears i use one mysql setup for all servers http://wiki2.dovecot.org/Plugins/Expire and doing cron jobs on every server i.e doveadm expunge -A mailbox Trash savedbefore 30d fit the cron times and expunge times and folders to your needs prepare for cron mail messages what got expunged if you have lots off acounts there may be better ways -- Best Regards MfG Robert Schetterer
Re: [Dovecot] Expire plugin with multiple mail servers
On 11.9.2012, at 12.41, Ramón Frontera wrote: Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. The backend servers need to be the ones actually doing the expunges. Director servers are the only ones that know which backend server to run each expunge on. Expire plugin works by limiting the users iterated by doveadm expunge -A, which is run on director. So the director server where you run this command needs to have access to the full expire database. This pretty much means one shared SQL server between all servers.
Re: [Dovecot] Expire-tool does not delete duplicate messages (dovecot-1.2.17)
On 17.8.2012, at 14.24, Oleksii Krykun wrote: Trying to implement expire plugin. expire-tool works fine. This delete expunged messages but not all of them. I have duplicate messages in appropriate folder. These messages are from expanding postfix aliases (e.g. postmaster@, hostmaster@, abuse@ etc. points to same mailbox and spam often sent to all of them. If duplicate message is received only one entry in dovecot-uidlist is created and only first of duplicates is deleted with expire-tool. Rest of duolicates are not deleted. Any suggestions. No idea, but if it's a bug, it won't be fixed anymore in v1.2. The whole thing has been rewritten in v2.x. I suggest upgrade.
Re: [Dovecot] expire-tool stops on first box with nothing to expire in it
Timo Sirainen writes: In practice, if this query is done on a periodic interval (e.g. daily), the date.saved will be roughly correct, and is usable as an age test for expungement. Is there a way to force this value to be cached when the client actually saves or moves a message? Done for save: http://hg.dovecot.org/dovecot-2.1/rev/c598f76d Fixed copy: http://hg.dovecot.org/dovecot-2.1/rev/b13b8267999d It still doesn't add it to cache if it's not already cached in both the source and destination mailbox, but usually it should be after initial doveadm run. Thanks, Timo. Joseph Tam jtam.h...@gmail.com
Re: [Dovecot] expire-tool stops on first box with nothing to expire in it
On 19.7.2012, at 4.24, Joseph Tam wrote: I previously observed that the date.saved field (tested by savedbefore) seems to be clustered around particular timestamps. Dumping out this field using doveadm -ftab fetch -A \ mailbox date.saved \ \( mailbox Trash OR mailbox Junk OR mailbox Deleted Items \) it seems the timestamps do not actually correspond to when the client moves messages to their trash folder, but rather, to the time I query for it i.e. a query instantiates this value. This timestamp is then retained. In practice, if this query is done on a periodic interval (e.g. daily), the date.saved will be roughly correct, and is usable as an age test for expungement. Is there a way to force this value to be cached when the client actually saves or moves a message? Done for save: http://hg.dovecot.org/dovecot-2.1/rev/c598f76d Fixed copy: http://hg.dovecot.org/dovecot-2.1/rev/b13b8267999d It still doesn't add it to cache if it's not already cached in both the source and destination mailbox, but usually it should be after initial doveadm run.
Re: [Dovecot] expire-tool stops on first box with nothing to expire in it
On 7/14/2012 11:14 PM, Robert Schetterer wrote: 1.2.11 is outdated you should upgrade 2.1.8 and try again Thanks. I knew the version was old but I wasn't quite ready for the upgrade. Anyway, I got ready, sat down and upgraded to 2.1.8 this weekend and have it all running again now. Expiring however still behaves the same as far as I can tell. The output is different now using doveadm but the behavior seems the same or at least very similar. When I run for example: doveadm -D search -A mailbox Trash savedbefore 60d /tmp/discard (the /tmp/discard is only there to send all the listed messages into the file to make the output more comprehensive) the results always end in something like: doveadm(u...@domain.org): Debug: expire: Stopping iteration on key shared/expire/nextu...@domain.org/Trash (1340238662 1337415398) If I use different savedbefore values, it stops in different places, but always the same with the same value. If I set the value way down to 3 it only goes through about 70 boxes before it stops. Yet there are over 1000 in the expire database. And if I run the same command on a specific user (one that's not in the result set of -A) rather than -A I do get a list of messages. So there are definitely users with messages that should be returned as part of this but are not. Any ideas on what's wrong? Just in case my doveconf -n is below. Michael # 2.1.8: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-92.el5 x86_64 CentOS release 5.2 (Final) ext3 auth_master_user_separator = * base_dir = /var/run/dovecot dict { expire = mysql:/usr/local/etc/dovecot-dict-expire.conf } disable_plaintext_auth = no info_log_path = /var/log/dovecot.log listen = 10.254.100.254,localhost,10.254.100.253 log_path = /var/log/dovecot.err mail_gid = 5000 mail_location = maildir:/usr/local/mail/%1u/%1.1u/%u mail_plugins = expire quota mail_uid = 5000 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave passdb { args = /usr/local/etc/restrict-users driver = passwd-file } passdb { args = /usr/local/etc/dovecot/passwd.masterusers driver = passwd-file master = yes pass = yes } passdb { driver = shadow } passdb { args = /usr/local/etc/dovecot-ldap.conf driver = ldap } plugin { autocreate = Trash autocreate2 = Spam autocreate3 = Drafts autocreate4 = Sent autosubscribe = Trash autosubscribe2 = Spam autosubscribe3 = Drafts autosubscribe4 = Sent expire = Spam expire2 = Trash expire3 = Trash/* expire_dict = proxy::expire quota = maildir:User quota quota_warning = storage=80%% quota-warning 80 %u quota_warning2 = storage=85%% quota-warning 85 %u quota_warning3 = storage=90%% quota-warning 90 %u quota_warning4 = storage=95%% quota-warning 95 %u sieve = /usr/local/users/%u/.dovecot.sieve sieve_dir = /usr/local/users/%u/sieve } protocols = imap pop3 sieve service auth { unix_listener auth-userdb { mode = 0600 user = vmail } } service dict { unix_listener dict { mode = 0600 user = vmail } } service imap-login { executable = /usr/local/libexec/dovecot/imap-login process_limit = 384 process_min_avail = 5 service_count = 1 } service imap-postlogin { executable = script-login /usr/local/bin/last_login.sh user = $default_internal_user } service imap { executable = /usr/local/libexec/dovecot/imap imap-postlogin process_limit = 1024 } service managesieve-login { process_min_avail = 5 service_count = 1 } service pop3-login { executable = /usr/local/libexec/dovecot/pop3-login process_limit = 384 process_min_avail = 5 service_count = 1 } service pop3 { executable = /usr/local/libexec/dovecot/pop3 process_limit = 1024 } service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { user = vmail } user = dovecot } ssl_cert = /etc/pki/dovecot/certs/dovecot.pem ssl_key = /etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } userdb { args = /usr/local/etc/dovecot-ldap.conf driver = ldap } protocol sieve { managesieve_logout_format = bytes=%i/%o managesieve_max_line_length = 65536 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave } protocol imap { mail_plugin_dir = /usr/local/lib/dovecot/imap mail_plugins = quota autocreate expire imap_quota } protocol pop3 { mail_plugin_dir = /usr/local/lib/dovecot/pop3 mail_plugins = quota expire } protocol lda { auth_socket_path = /var/run/dovecot/auth-userdb hostname = ms.xyz987.org info_log_path = /var/log/dovecot-lda.log log_path = /var/log/dovecot-lda.err
Re: [Dovecot] expire-tool stops on first box with nothing to expire in it
Michael Wessel writes: When I run for example: doveadm -D search -A mailbox Trash savedbefore 60d /tmp/discard I previously observed that the date.saved field (tested by savedbefore) seems to be clustered around particular timestamps. Dumping out this field using doveadm -ftab fetch -A \ mailbox date.saved \ \( mailbox Trash OR mailbox Junk OR mailbox Deleted Items \) it seems the timestamps do not actually correspond to when the client moves messages to their trash folder, but rather, to the time I query for it i.e. a query instantiates this value. This timestamp is then retained. In practice, if this query is done on a periodic interval (e.g. daily), the date.saved will be roughly correct, and is usable as an age test for expungement. Is there a way to force this value to be cached when the client actually saves or moves a message? Joseph Tam jtam.h...@gmail.com
Re: [Dovecot] expire-tool stops on first box with nothing to expire in it
Am 15.07.2012 05:34, schrieb Michael Wessel: Hi, I'm running dovecot 1.2.11 on Centos and have the expire plugin enabled. I've had this in place for some time but until now never actually ran the expire-tool. I'm now trying to put this to use. The expire plugin as such is working fine and also the tool is working fine - up to a point. When I run it with --test it goes through a bunch of boxes and lists the messages it would expunge and the new date being logged at the end. As soon as it hits the first box that has nothing in it that's expired however, it stops and goes no further. As an example here are the last two lines of the output when I just ran it: Info: u...@domain.com/Trash: timestamp 1342320464 (Sat Jul 14 19:47:44 2012) - 1342937319 (Sat Jul 21 23:08:39 2012) Info: nextu...@domain.com/Trash: stop, expire time in future: Sat Jul 14 20:41:49 2012 If I run it again after the indicated expire time it will now also go through the nextu...@domain.com but then again stop as soon as it encounters another user with nothing to expire. As far as I can tell the same happens when I actually run the tool. Harder to tell of course as there is no output, but I can tell that not all boxes are expunged as they should be. Any ideas why this would be? Any way to get debug logging on this? Michael 1.2.11 is outdated you should upgrade 2.1.8 and try again however 1.2.17 is latest patch level for 1.2 -- Best Regards MfG Robert Schetterer
Re: [Dovecot] Expire plugin not executing for sieve plugin?
No ideas? I googled some more and eventually turned up this posting: http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716.html guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :(
Re: [Dovecot] Expire plugin not executing for sieve plugin?
On 10/24/2011 7:52 PM, Dan Swartzendruber wrote: No ideas? I googled some more and eventually turned up this posting: http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716.html guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :( Hmm, wonder why no one answered that one. In theory, those plugins should interact gracefully. However, if something is wrong, I cannot test this right now, since I've not installed expire so far. I'll ask Timo if he can take a look at this. Otherwise, I'll have to build a small test setup first, which may take some time. Regards, Stephan.
Re: [Dovecot] expire-tool skipping mailbox
On Mon, 2011-04-18 at 14:45 -0500, Alex Reinhart wrote: I resolved this issue by deleting some messages from my Junk mailbox which had Date headers long in the past and future, despite being very old. It appears to me that expire-tool quit when a message had a Date header forged to be non-expired, despite the message being old enough to have been expired. A bug in expire-tool? expire-tool should have been looking at save-date, which with maildir is taken from the file's ctime. So I don't know why a Date: header would have caused any of this.. Anyway, v2.0 has this feature entirely rewritten.
Re: [Dovecot] expire-tool skipping mailbox
I resolved this issue by deleting some messages from my Junk mailbox which had Date headers long in the past and future, despite being very old. It appears to me that expire-tool quit when a message had a Date header forged to be non-expired, despite the message being old enough to have been expired. A bug in expire-tool? - Alex Reinhart On Apr 15, 2011, at 3:15 PM, Alex Reinhart wrote: Hello, I have dovecot set up with expire-tool to nuke Junk messages greater than 30 days old. On a server with many user accounts, it seems to work on most of them. However, on my user account, expire-tool skips my Junk folder entirely, despite it containing messages from January of this year. Here is the expire-tool --test output: Info: a...@scienceforums.net/Junk: timestamp 1284027481 (Thu Sep 9 05:18:01 2010) - 1304023056 (Thu Apr 28 15:37:36 2011) Then it skips to the next mailbox. (Note that I intentionally set the timestamp back to force it to consider my mailbox.) I don't understand why it doesn't want to expunge my 2700 junk messages when it will expunge several thousand in other accounts happily. The expire plugin has been enabled for probably over a year, so all of the messages should be tracked. My only hypothesis is that it has something to do with variables in the mail_location; however, mail_location should be overridden by a user_query, though that contains variables too. Would this account for the issue? It seems unlikely, since other users on the server work just fine. dovecot -n output for the interested: # 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-24-server x86_64 Ubuntu 10.04.2 LTS ext3 base_dir: /var/run/dovecot/ log_timestamp: %Y-%m-%d %H:%M:%S protocols: managesieve imaps pop3s listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 listen(managesieve): * ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(pop3): *:995 ssl_listen(managesieve): login_dir: /var/run/dovecot//login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login first_valid_uid: 150 last_valid_uid: 150 mail_privileged_group: mail mail_location: maildir:/var/vmail/%d/%u mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota imap_quota expire mail_plugins(imap): quota imap_quota expire mail_plugins(pop3): quota expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: mail_plugins: quota sieve expire postmaster_address: postmas...@xyloid.org sendmail_path: /usr/lib/sendmail auth_socket_path: /var/run/dovecot/auth-master sieve_global_path: /etc/dovecot/sieve.global auth default: user: nobody passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: mail plugin: quota: dict:user::proxy::quotadict quota_rule: *:storage=1G quota_rule2: Trash:storage=10%% quota_rule3: Junk:ignore sieve: /var/vmail/%d/%n/dovecot.sieve expire: Trash 7 Trash/* 7 Junk 30 expire_dict: proxy::expire dict: quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf expire: mysql:/etc/dovecot/dovecot-dict-expire.conf And dovecot-dict-expire.conf: connect = host=localhost dbname=mail user=mail password=[password] map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } Thanks. - Alex Reinhart
Re: [Dovecot] expire plugin and sieve
On Thu, 10 Feb 2011 02:07:38 +0200, Timo Sirainen t...@iki.fi wrote: However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something? If you didn't yet find out: lda: mail_plugins: expire mail_plugins: sieve The second mail_plugins setting overrides the first one. Use: mail_plugins = expire sieve Thanks, this works to the extent that dates are now written into the database when mails are moved by sieve filters. What doesn't work (and I spent the last weeks testing and googling, hence my late reply) is the deletion of expired mails. When an expiration date occurs, the database is updated, but nothing is deleted. I have implemented a test with a 1 day expiry. Dates get updated, nothing is deleted. Output of expire tool: Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: expire: pattern=INBOX.Trash type=expunge secs=604800 Info: expire: pattern=INBOX.Mailing-Lists.test type=expunge secs=86400 Info: expire: pattern=INBOX.Spam type=expunge secs=2592000 Info: auth input: uid=5000 Info: auth input: gid=5000 Info: auth input: home=/home/vmail/example.com/user1 Info: Namespace: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail//:INDEX=/var/indexes/ Info: maildir++: root=/home/vmail/, index=/var/indexes, control=, inbox=/home/vmail/ Info: auth input: uid=5000 Info: auth input: gid=5000 Info: auth input: home=/home/vmail/example.com/user2 Info: Namespace: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail//:INDEX=/var/indexes/ Info: maildir++: root=/home/vmail/, index=/var/indexes, control=, inbox=/home/vmail/ Is this an issue with the mail_location setting? I know the wiki says something about a userdb lookup returning the mail location, but, frankly, I'm not sure what that's supposed to say... Thanks.
Re: [Dovecot] expire plugin and sieve
On Sat, 2011-01-22 at 08:27 +0100, c...@kruemel.org wrote: However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something? If you didn't yet find out: lda: mail_plugins: expire mail_plugins: sieve The second mail_plugins setting overrides the first one. Use: mail_plugins = expire sieve
Re: [Dovecot] Expire plugin does not work
On Thu, 2010-12-16 at 20:55 +0100, Christoph Pleger wrote: dovecot: dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1292525469','christoph','Trash')) failed: unable to open database file (14) So SQLite can't open its database. I don't know what 14 error would mean, maybe SQLite docs can tell you. connect = /etc/dovecot/dovecot-dict.sqlite Databases shouldn't really be put under /etc.. Rather maybe /var/lib/dovecot/ I have attached a dovecot -n-generated dovecot.conf, the configuration file for the expire dict service, and my sqlite3 database file. In my filesystem, dovecot-dict.sqlite currently has permissions 666. But if it's 0666, I'm not really sure what the problem could be. You could try if dict can access it as root: service dict { user = root }
Re: [Dovecot] Expire plugin does not work
Hello, But if it's 0666, I'm not really sure what the problem could be. You could try if dict can access it as root: service dict { user = root } I have found the solution: The directory where the sqlite3 database resides must be writable by the dovecot user. Regards Christoph
Re: [Dovecot] Expire plugin does not work
Hello, I forgot to mention the dovecot version number. It is version 2.0.7. Regards Christoph
Re: [Dovecot] Expire Mysql backend
Well, looks like there isn't exactly that kind of support, at least not easily.. But there are a couple of choices: a) Do you really need expire plugin? Do you have that many users that it's actually required? If not, you can just run doveadm expunge command separately for each user, giving whatever date rule the user wants. b) Use expire plugin, but run it multiple times, once for each group of users who have the same date rule. Getting the list of users is a bit tricky though. On Thu, 2010-09-16 at 14:40 +0200, Paweł Madej wrote: Hello Timo, After searching documentation a lot I had to write here. I'm sorry to say that Expire plugin documentation says nothing about such configuration scenario. There are only informations about dict and timestamps. but this was also in 1.2.x version. Could you link where to read about this new feature? On Mon, 13 Sep 2010 12:57:23 +0100, Timo Sirainen t...@iki.fi wrote: On Thu, 2010-09-09 at 11:17 +0200, Paweł Madej wrote: Is it possible to make expire plugin get per user number of days to expire emails in trash? for example user1 trash 14d user2 trash 30d user3 trash 0d - disable v2.0 yes, v1.x no.
Re: [Dovecot] Expire Mysql backend
On Thu, 2010-09-09 at 11:17 +0200, Paweł Madej wrote: Is it possible to make expire plugin get per user number of days to expire emails in trash? for example user1 trash 14d user2 trash 30d user3 trash 0d - disable v2.0 yes, v1.x no.
Re: [Dovecot] Expire Mysql backend
I use v1.2.x for now because 2.0 is hard masked in gentoo portage. How stable is v2.0 for now? is it suitable for production environment or should I wait a bit until it is more tested? On Mon, 13 Sep 2010 12:57:23 +0100, Timo Sirainen t...@iki.fi wrote: On Thu, 2010-09-09 at 11:17 +0200, Paweł Madej wrote: Is it possible to make expire plugin get per user number of days to expire emails in trash? for example user1 trash 14d user2 trash 30d user3 trash 0d - disable v2.0 yes, v1.x no. -- Paweł Madej
Re: [Dovecot] Expire Mysql backend
On 13.09.2010 15:00, Paweł Madej wrote: I use v1.2.x for now because 2.0 is hard masked in gentoo portage. Not anymore. Please sync your tree. How stable is v2.0 for now? is it suitable for production environment or should I wait a bit until it is more tested? That is for you to decide. Historically, dovecot has been pretty stable. We have enabled v2.0 on test servers and for a small number of accounts with no problems so far. -- Eray
Re: [Dovecot] Expire Mysql backend
On Mon, 13 Sep 2010 15:09:37 +0300, Eray Aslan eray.as...@caf.com.tr wrote: On 13.09.2010 15:00, Paweł Madej wrote: I use v1.2.x for now because 2.0 is hard masked in gentoo portage. Not anymore. Please sync your tree. That's nice :) How stable is v2.0 for now? is it suitable for production environment or should I wait a bit until it is more tested? That is for you to decide. Historically, dovecot has been pretty stable. We have enabled v2.0 on test servers and for a small number of accounts with no problems so far. If you say so maybe I'll try backing up current configuration and test 2.0.2. This is build from scratch server to which I'll migrate users from another server. -- Paweł Madej Zajrzyj na Internetowe Forum Farmaceutyczne http://forum-farmaceutyczne.org/s/k
Re: [Dovecot] Expire Mysql backend
On 2010-09-13 8:00 AM, Paweł Madej pawel.ma...@profarmaceuta.pl wrote: I use v1.2.x for now because 2.0 is hard masked in gentoo portage. What arch? Its ~unstable for amd64... -- Best regards, Charles
Re: [Dovecot] Expire Mysql backend
amd64 stable now but last week as i synced it was masked. now its ~amd64. thanks for pointing out :* On Mon, 13 Sep 2010 09:03:24 -0400, Charles Marcus cmar...@media-brokers.com wrote: On 2010-09-13 8:00 AM, Paweł Madej pawel.ma...@profarmaceuta.pl wrote: I use v1.2.x for now because 2.0 is hard masked in gentoo portage. What arch? Its ~unstable for amd64... -- Paweł Madej Zajrzyj na Internetowe Forum Farmaceutyczne http://forum-farmaceutyczne.org/s/k
Re: [Dovecot] expire plugin
Timo Sirainen wrote: On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: expire: .Trash 1 .Trash/* 1 .Spam 2 Remove '.' before the mailbox names. That good Thank you very much # 1.2.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.5 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3s managesieve disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login mail_privileged_group: mail *mail_location: maildir:~ *mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota expire imap_quota autocreate mail_plugins(imap): quota expire imap_quota autocreate mail_plugins(pop3): quota expire autocreate mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: postmaster_address: arn...@ungi.net mail_plugins: quota expire sieve autocreate auth_socket_path: /var/run/dovecot/auth-master auth default: mechanisms: plain login verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: maildir expire: Trash 1 Trash/* 1 Spam 2 expire_dict: proxy::expire sieve: ~/.dovecot.sieve sieve_after: /home/vmail/sieve/default.sieve autocreate: Trash autocreate2: Spam autocreate3: Sent autocreate4: Inbox autocreate5: Drafts autocreate6: Templates autosubscribe: Trash autosubscribe2: Spam autosubscribe3: Sent autosubscribe4: Inbox autosubscribe5: Drafts autosubscribe6: Templates dict: expire: mysql:/etc/dovecot/dovecot-dict-expire.conf # cat /etc/dovecot/dovecot-dict-expire.conf connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox table = dovecot_expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } mysql desc dovecot_expires; +--+--+--+-+-+---+ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+-+---+ | username | varchar(255) | NO | PRI | NULL| | | mailbox | varchar(255) | NO | PRI | NULL| | | expire_stamp | int(11) | NO | | NULL| | +--+--+--+-+-+---+ # cat /etc/dovecot/dovecot-sql.conf driver = mysql connect = host=localhost user=xxx password=xxx dbname=postfixadmin user_query = SELECT CONCAT('/home/vmail/homes/',maildir) AS *home,* 65500 AS uid, 65500 AS gid, \ CONCAT('*:bytes=', CAST(quota AS CHAR)) AS quota_rule \ FROM mailbox WHERE username = %u AND active=1 password_query = SELECT username as user, password, maildir as userdb_home, 65500 as userdb_uid, 65500 as userdb_gid FROM mailbox WHERE username = '%u' AND active=1
Re: [Dovecot] expire plugin
On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox .. Is pattern ok ? No, it always must be shared/expire/$user/$mailbox.
Re: [Dovecot] expire plugin
Timo Sirainen wrote: On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox .. Is pattern ok ? No, it always must be shared/expire/$user/$mailbox. Hi Timo I'have changed, but i always have nothing in the database. An idea ? # cat /etc/dovecot/dovecot-dict-expire.conf connect = host=localhost user=xx password=xxx dbname=postfixadmin map { pattern = shared/expire/$user/$mailbox table = dovecot_expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } }
Re: [Dovecot] expire plugin
On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: expire: .Trash 1 .Trash/* 1 .Spam 2 Remove '.' before the mailbox names.
Re: [Dovecot] expire
This is a bashism. The script should begin #!/bin/bash, not #!/bin/sh. Or rewrite it in plain sh: l= for i in ${MAIL_PLUGINS}; do case $i in imap_quota|mail_log) ;; *) l=$l $i;; esac done MAIL_PLUGINS=${l# }
Re: [Dovecot] expire
On Tue, Jul 6, 2010 at 11:35, Papp Tamás tom...@martos.bme.hu wrote: /usr/lib/dovecot/expire-tool.sh Is it a script? I'm on Ubuntu 9.10 with Dovecot 1.1.11 and there is no /usr/lib/dovecot/expire-tool.sh though there is a /usr/lib/dovecot/expire-tool file which is an executable binary. marconi/root/x0 /root 381# ls -dl /usr/lib/dovecot/expire-tool -rwxr-xr-x 1 root root 733856 2009-10-15 00:38 /usr/lib/dovecot/expire-tool marconi/root/x0 /root 382# od -Ax -tx4 -w16 /usr/lib/dovecot/expire-tool | head 00 464c457f 00010102 10 003e0003 0001 7fa0 20 0040 000b2b60 30 00380040 0049 001c001d 40 0006 0005 0040 50 0040 0040 60 01f8 01f8 70 0008 0003 0004 80 0238 0238 90 0238 001c marconi/root/x0 /root 383#
Re: [Dovecot] expire
Phil Howard wrote: On Tue, Jul 6, 2010 at 11:35, Papp Tamás tom...@martos.bme.hu wrote: /usr/lib/dovecot/expire-tool.sh Is it a script? I'm on Ubuntu 9.10 with Dovecot 1.1.11 and there is no /usr/lib/dovecot/expire-tool.sh though there is a /usr/lib/dovecot/expire-tool file which is an executable binary. marconi/root/x0 /root 381# ls -dl /usr/lib/dovecot/expire-tool -rwxr-xr-x 1 root root 733856 2009-10-15 00:38 /usr/lib/dovecot/expire-tool marconi/root/x0 /root 382# od -Ax -tx4 -w16 /usr/lib/dovecot/expire-tool | head 00 464c457f 00010102 10 003e0003 0001 7fa0 20 0040 000b2b60 30 00380040 0049 001c001d 40 0006 0005 0040 50 0040 0040 60 01f8 01f8 70 0008 0003 0004 80 0238 0238 90 0238 001c marconi/root/x0 /root 383# Possible apologies re grannies/egg-sucking, but: Where you want to find out what a file is in situations like this, you may find the program file useful lu...@myhost:~$ file /usr/lib/dovecot/expire-tool /usr/lib/dovecot/expire-tool: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped lu...@myhost:~$ On Ubuntu, the file program is provided by the package file. Bill
Re: [Dovecot] expire
On Tue, Jul 06, 2010 at 01:06:42PM -0400, Phil Howard wrote: On Tue, Jul 6, 2010 at 11:35, Papp Tamás tom...@martos.bme.hu wrote: /usr/lib/dovecot/expire-tool.sh Is it a script? I'm on Ubuntu 9.10 with Dovecot 1.1.11 and there is no /usr/lib/dovecot/expire-tool.sh though there is a /usr/lib/dovecot/expire-tool file which is an executable binary. Sorry for the poor infor:( Actually it's not exactly the Ubuntu's version of dovecot. It's 1.2.10-0~auto+106 from http://xi.rename-it.nl/debian/ . And yes, it's a script: #!/bin/sh # # To make expire-tool working some failing plugins have to be removed # from MAIL_PLUGINS environment variable. # (see: http://wiki.dovecot.org/Plugins/Expire) # # This script must be installed as /usr/lib/dovecot/expire-tool.sh MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} exec ${0%.sh} $@ Thank you, tamas
Re: [Dovecot] expire
Looks like a newer version that I can't help on. Should be plenty others around at some point. -- sHiFt HaPpEnS!
Re: [Dovecot] expire
Phil Howard wrote, On 2010. 07. 06. 23:10: Looks like a newer version that I can't help on. Should be plenty others around at some point. If I run only the pure binary: $ dovecot --exec-mail ext /usr/lib/dovecot/expire-tool Error: dlopen(/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so: undefined symbol: capability_string Fatal: Couldn't load required plugins I'm sure, I do something the wrong way. tamas
Re: [Dovecot] expire
Hi, I'm sure, I do something the wrong way. indeed. Check dovecot-wiki, section Dovecot v1.2: http://wiki.dovecot.org/Plugins/Expire create the expire-tool.sh and use this instead of the binary. best regards, Anton
Re: [Dovecot] expire
On 6.7.2010, at 22.07, Papp Tamas wrote: #!/bin/sh .. MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} This is a bashism. The script should begin #!/bin/bash, not #!/bin/sh.
Re: [Dovecot] expire plugin
2010/6/22 Timo Sirainen t...@iki.fi: I am testing expire plugin, with quota plugin enabled. When I execute expire-tool, maildirsize is not updated. Is there any solution to update maildirsize when executing expire-tool? # /usr/local/dovecot/sbin/dovecot --version 1.1.18 You could try if setting MAIL_PLUGINS=quota before executing expire-tool works. If not, you'll need v1.2. Setting MAIL_PLUGINS=quota did not work. I tried v1.2, it worked. Thanks
Re: [Dovecot] expire plugin
On Mon, 2010-06-21 at 12:25 +0900, suzuki wrote: Hello, I am testing expire plugin, with quota plugin enabled. When I execute expire-tool, maildirsize is not updated. Is there any solution to update maildirsize when executing expire-tool? # /usr/local/dovecot/sbin/dovecot --version 1.1.18 You could try if setting MAIL_PLUGINS=quota before executing expire-tool works. If not, you'll need v1.2.
Re: [Dovecot] Expire plugin
Hi, We've resolved the issues that started this thread off. We needed to recompile our version of Dovecot (1.1.6) with the inclusion of the mySQL libraries. With this done, we were able to connect Dovecot to the mySQL db, and got the expire plugin to save times to the db. This works great, and we're very excited to get this to work. We're now trying to actually expunge the messages, using the expire tool, and are running into some questions that we need answered. I saw the notice about the expire tool and mail_location that use %u in the path. This is the mail_location that we're using in our configuration: mail_location = mbox:~:INBOX=/var/mail/%u:INDEX=/var/mail/.dovecot-index/%1u/%u/ The documentation refers to pulling values from the userdb to set a HOME or MAIL variable so that dovecot can see the proper location with the 1.1.x series. What userdb is this referring to? We haven't used a userdb with any of our implementations of dovecot to this point, and setting one up at this point really isn't an option. The documentation seems to indicate that you can use a passwd file to set these variables, but that to do so means manipulating each user's entry, which again, really isn't an option. Is there anyone that is getting around this somehow? Seems pretty common to use %u within the mail_location, so I'm wondering how people have dealt with this. Is there any other way to get around this problem? We were looking at the expire tool source to see if we could manipulate how the user is being passed there. This would be an option we would pursue, if we could know what changes would need to be made. Seems like the expire tool utilizes much of the dovecot code itself to do its job. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Actually, this is where the problem is coming in. We'd switched the server from using IMAPS to IMAP, and I'd neglected to change the folder location. So, now using the mail/Trash folder, I'm again seeing the permission denied. We'd determined that the dict-server socket that was being used was a stale one. So, we removed it, and are now getting a No such file or directory error. How is this socket created? I'd have thought it would be created upon Dovecot starting up, but it is not doing so. Is it something in the plugin settings that causes this to be created? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of MinnesotaEmail: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet Services Office: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: I do now see on the console: Apr 22 16:56:14 mars.tc.umn.edu imap(testg019): : net_connect_unix(/var/opt/dovecot/run/dovecot/dict-server) failed: Connection refused I owned this file to mysql:mysql now, and the error has gone away on subsequent logins, but I still don't see anything in the db. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I
Re: [Dovecot] Expire plugin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 23 Apr 2010, Thomas M Goerger wrote: How is this socket created? I'd have thought it would be created upon I would say on the start of Dovecot. Dovecot starting up, but it is not doing so. Is it something in the plugin settings that causes this to be created? No, the plugin just uses the dict server. You need something like this in your conf: dict { quotadict = mysql:/etc/dovecot-dict-sql.conf } Regarding the socket: Connection refused typically means, IMHO, that there is no listener on the socket. So I guess that there is no dict server running. Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9aQob+Vh58GPL/cAQJvoQf+ON20D1UXIuK76RH4dvqatRVKmFxJwiro ppJ8uLCg8eIz9qudA9H8or18uOZXfRbFc6dxwLIr6FyC91LrqylcaAH+xOQxpSYF 7jmnbAvf+xLjF9hhX3XddBEL3oJNN4EPw6lw02XXLN7/ZrZ7oAaMYRfB1maHQnHs yCqj4bk/NhKfXGfnWpkbQv4afR9N6evWKpTIlMzuWnBYh18SP6FwEegpWVyEmTar a71EjTrIGwXp+rcZJclnj2JWbov+xwFB0STx1LDM4+Ejo+zjpUOSbqiwuyaE10Sj OSbr5BgvB6hGyev/plGOrYgy+YhAw0g76L8KT+Gpj3kTl5MFgtuLUA== =j9Zz -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I checked to make sure that the user that I'd set up in the db had the correct permissions to be able to talk to the right db and tables. Does it need to have any global permissions set? Most importantly though, is there any logging being done anywhere? Anything I can check to see what interaction might be happening between dovecot and the db? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
I do now see on the console: Apr 22 16:56:14 mars.tc.umn.edu imap(testg019): : net_connect_unix(/var/opt/dovecot/run/dovecot/dict-server) failed: Connection refused I owned this file to mysql:mysql now, and the error has gone away on subsequent logins, but I still don't see anything in the db. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I checked to make sure that the user that I'd set up in the db had the correct permissions to be able to talk to the right db and tables. Does it need to have any global permissions set? Most importantly though, is there any logging being done anywhere? Anything I can check to see what interaction might be happening between dovecot and the db? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of MinnesotaEmail: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet Services Office: 626J WBOB* * * * On Fri, 23 Apr 2010, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
Actually, this is where the problem is coming in. We'd switched the server from using IMAPS to IMAP, and I'd neglected to change the folder location. So, now using the mail/Trash folder, I'm again seeing the permission denied. We'd determined that the dict-server socket that was being used was a stale one. So, we removed it, and are now getting a No such file or directory error. How is this socket created? I'd have thought it would be created upon Dovecot starting up, but it is not doing so. Is it something in the plugin settings that causes this to be created? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: I do now see on the console: Apr 22 16:56:14 mars.tc.umn.edu imap(testg019): : net_connect_unix(/var/opt/dovecot/run/dovecot/dict-server) failed: Connection refused I owned this file to mysql:mysql now, and the error has gone away on subsequent logins, but I still don't see anything in the db. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of MinnesotaEmail: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet Services Office: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I checked to make sure that the user that I'd set up in the db had the correct permissions to be able to talk to the right db and tables. Does it need to have any global permissions set? Most importantly though, is there any logging being done anywhere? Anything I can check to see what interaction might be happening between dovecot and the db? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin / expire-tool redesign for doveadm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 13 Apr 2010, Timo Sirainen wrote: The expire plugin keeps track of the oldest message in configured mailboxes. Its only configuration is the list of tracked mailboxes. There's no configuration like what the expire timeouts are or anything. My first idea, that hit me after reading through the whole post, was to keep track of all mailboxes of all users and issue the commands later. The plugin saves just one value per physical mailbox, when a) the first message arrives an empty mailbox or messages are expunged? Or each time a message is received. What would be the impact of monitoring all mailboxes? There will be a new doveadm command: doveadm expunge [-u user | -A] mailbox search query What about shared mailboxes and namespaces? Can mailbox be a phyiscal path rather than a IMAP mailbox name? So when you want to expunge all mails from Trash older than 1 week for all users, you say: doveadm expunge -A Trash savedbefore 1w TODO: - When using multiple mailboxes it would be more optimal to handle all mailboxes for a user at once, rather than using separate doveadm commands. Maybe the command syntax needs some more thinking to support this. Different mailboxes could have different rules though.. Hmm, does doveadm support to read commands from stdin / file? If I imagine such scenario with some hundreds of users having configured expire for some folders, that leads to plenty of process creations etc.pp. doveadm EOT expunge -A Trash savedbefore 1w expunge -u user1 INBOX savedbefore 1y expunge -u user2 INBOX savedbefore 1m EOT Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS8V2/b+Vh58GPL/cAQJloggAwxk85Y3pCeu6u6timuP25JJ1tRy/mlfr L2sgMooKtQOjz5VJZeLQnQEwDfbFItdRMMbwSg60R740h+yIVhNiJ+sQZ8FdUohj hlUpvMJzdY2XG1R3/dBqEhhHx2YXYfxszyPykvjPOXFz7v/TXqvGJUHdZG13uqRL /qVuhlstR/DBot9xlcqDWiJ/v2hiE53BQxfMn1Umfm05le8C/i9ELHCHC2NKIo6a zCURknf0ORwxoL8E2whRVpUXUCeaJHjDYcKTnGtAsZPlpFRylMiaGN/cDSTrqqpw kMpUtQ8cQbdgkaLgvpRhwxNZm5OjUaa6LyEsTSBTEHTSLa1SM6GSPw== =Yfvd -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin / expire-tool redesign for doveadm
On 14.4.2010, at 11.04, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 13 Apr 2010, Timo Sirainen wrote: The expire plugin keeps track of the oldest message in configured mailboxes. Its only configuration is the list of tracked mailboxes. There's no configuration like what the expire timeouts are or anything. My first idea, that hit me after reading through the whole post, was to keep track of all mailboxes of all users and issue the commands later. The plugin saves just one value per physical mailbox, when a) the first message arrives an empty mailbox or messages are expunged? Or each time a message is received. What would be the impact of monitoring all mailboxes? Looks like the current code does a dict lookup every time messages are saved. I guess this is mainly to fix the situation when expire plugin is enabled after messages already exist in mailbox. But this check could be moved to doveadm I think.. So the dict would only be updated when: 1) message arrives on empty mailbox 2) first message is expunged But I don't think it's useful to do this for all mailboxes. Even if it doesn't impact normal performance, it wastes disk space on the database for no reason. But expire plugin already supports wildcards, so just telling it to monitor * mailboxes would get what you want. There will be a new doveadm command: doveadm expunge [-u user | -A] mailbox search query What about shared mailboxes and namespaces? Can mailbox be a phyiscal path rather than a IMAP mailbox name? No. By shared mailboxes I guess you mean public (i.e. not another user's mailboxes)? You can expunge them using some user that has rights to do that, and using e.g. public/blah as the mailbox name. - When using multiple mailboxes it would be more optimal to handle all mailboxes for a user at once, rather than using separate doveadm commands. Maybe the command syntax needs some more thinking to support this. Different mailboxes could have different rules though.. Hmm, does doveadm support to read commands from stdin / file? I was actually thinking about that myself today too. If I imagine such scenario with some hundreds of users having configured expire for some folders, that leads to plenty of process creations etc.pp. doveadm EOT expunge -A Trash savedbefore 1w expunge -u user1 INBOX savedbefore 1y expunge -u user2 INBOX savedbefore 1m EOT I don't think the process creation is much of an issue. But something like this could work: doveadm expunge -A EOT Trash savedbefore 1w Trash/* savedbefore 1w Spam savedbefore 2mon EOT Another problem I had been thinking about was how to do the search query parsing. For example with fetch: doveadm fetch (unseen or unanswered) subject hello world That won't work, because shell compains about () characters. But they could be escaped with \( and \). The next problem is the quotes. If I know that a string is supposed to follow after subject, it't not really a problem. But I'd rather not build separate parsers for command line parsing and stdin parsing (because in stdin I need to handle internally). But without knowing the context, I don't know if: doveadm fetch subject (foo) should be translated to string (foo) or if there should be a list with foo as its only element. So maybe the whole thing should be instead: doveadm fetch '(unseen or unanswered) subject hello world' but that makes it more difficult to add variables, because if you do: doveadm fetch 'subject $foo' you need to make sure $foo escapes and \ characters. .. difficult..
Re: [Dovecot] expire plugin doesn't find mail location
On Tue, 2010-01-12 at 17:02 +0100, Roland Rosenfeld wrote: But the 'mail' attribute from userdb is still ignored by expire. Well, I'm getting a bit tired of fixing all the issues with expire-tool. Since you found a working solution for yourself, I won't do anything about this for now. v2.0 fixes this properly. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin doesn't find mail location
On Tue, 12 Jan 2010, I wrote: After searching for hours now, I give up and have to ask here. I try to use the expire plugin but it always tries to expire my mails instead of the mails of the user. So my main problem seems to be, that the mail attribute from the userdb is completely ignored in expire calls. But how do I fix this? The problem still persists, but I found a workaround: I configured mail_location=~/mail and set 'home' via userdb. With this setup expire seems to work correct. But the 'mail' attribute from userdb is still ignored by expire. Tscho Roland -- Roland Rosenfeld - Content Delivery - NED - Technik NetCologne Gesellschaft für Telekommunikation mbH - HRB 25580, AG Köln Am Coloneum 9 50829 Köln Tel.: +49-221--373 Fax: +49-221--7373 Geschäftsführer: Werner Hanf, Karl-Heinz Zankel
Re: [Dovecot] expire db(s)?
On Dec 18, 2009, at 5:57 PM, b...@electricembers.net wrote: with two separate dovecot/backend servers accessing one central mysql server, will it be ok to have them both use the same expires table? Or will that confuse the actual dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool.sh cronjob since some of the entries mailboxes won't exist locally? It'll break. If userdb lookup fails, expire-tool thinks that the user no longer exists and deletes the row from database. If it succeeds but the mail directory doesn't exist, it'll think the mailbox was deleted and deletes the row from database.
Re: [Dovecot] expire-tool and userdb returned mail location
Timo Sirainen wrote: On Sat, 2009-12-12 at 13:46 +0200, Tapio Sokura wrote: I'm having problems with expire-tool in Dovecot 1.2.6 not finding the mailboxes. I had Here's a simple way that should work: mail_location = mbox:~/mails:INDEX=~/indexes and then you can also drop the mail field from userdb. I did that and now expire-tool is finding the mailboxes and indexes, but not removing any messages. It updates the timestamps in the expires database table 10 days to the future for folders that have 10 day expiration time. It also seems to cause the addition of a save date (with the timestamp of expire-tool execution) to the first message in a folder it looks at. I did some more digging around with idxview and talking imap to the server. It looks like save dates aren't stored when mail is delivered (via dovecot LDA) or copied to a folder via imap. I got date.save fields to appear into the cache files when I fetched x-savedate via imap as shown on the Plugins/Expire page in the wiki. Those save dates were set to the time the imap fetch was performed, not to the time when the messages were delivered or copied to the folder. Is this the way it should be working? I've had expire listed in dovecot's mail_plugins for pop3, imap and lda protocol sections for several weeks now. Tapio
Re: [Dovecot] expire-tool and userdb returned mail location
Charles Marcus wrote: You forgot dovecot -n output... # 1.2.6: /usr/local/dovecot/etc/dovecot.conf # OS: Linux 2.6.18-164.6.1.el5 x86_64 CentOS release 5.4 (Final) base_dir: /var/run/dovecot/ protocols: imap imaps pop3 pop3s managesieve ssl_cert_file: /etc/pki/tls/certs/dovecot.crt ssl_key_file: /etc/pki/tls/private/dovecot.key disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable(default): /usr/local/dovecot/libexec/dovecot/imap-login login_executable(imap): /usr/local/dovecot/libexec/dovecot/imap-login login_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3-login login_executable(managesieve): /usr/local/dovecot/libexec/dovecot/managesieve-login login_process_per_connection: no login_process_size: 128 verbose_proctitle: yes first_valid_uid: 95 last_valid_uid: 95 first_valid_gid: 95 last_valid_gid: 95 mail_uid: dcmail mail_gid: dcmail mbox_write_locks: fcntl mail_executable(default): /usr/local/dovecot/libexec/dovecot/imap mail_executable(imap): /usr/local/dovecot/libexec/dovecot/imap mail_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3 mail_executable(managesieve): /usr/local/dovecot/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota trash expire mail_plugins(imap): quota imap_quota trash expire mail_plugins(pop3): quota expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/dovecot/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/dovecot/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/dovecot/lib/dovecot/pop3 mail_plugin_dir(managesieve): /usr/local/dovecot/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail tb-extra-mailbox-sep imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %08Xv%08Xu pop3_uidl_format(managesieve): %08Xu%08Xv pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): namespace: type: private separator: / inbox: yes list: yes subscriptions: yes namespace: type: private separator: / prefix: INBOX/ hidden: yes list: no subscriptions: yes lda: postmaster_address: postmas...@domain mail_plugins: sieve quota trash expire auth default: mechanisms: plain login cache_size: 1000 cache_ttl: 3000 cache_negative_ttl: 0 user: dcauth username_format: %Lu passdb: driver: sql args: /usr/local/dovecot/etc/sql.conf userdb: driver: prefetch userdb: driver: sql args: /usr/local/dovecot/etc/sql.conf socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: dcmail group: dcmail plugin: quota: dict:user::proxy::quotadict quota_rule: *:storage=1000M quota_rule2: Trash:storage=100M trash: /usr/local/dovecot/etc/trash.conf expire: Trash 10 Trash/* 10 Spam 60 expire_dict: proxy::expire sieve: ~/.dovecot.sieve sieve_dir: ~/sieve sieve_after: /usr/local/dovecot/etc/sieve_after.d dict: quotadict: mysql:/usr/local/dovecot/etc/dovecot-dict-quota.conf expire: mysql:/usr/local/dovecot/etc/dovecot-dict-expire.conf
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Mon, 23 Nov 2009 12:01:53 -0500 Timo Sirainen t...@iki.fi wrote: On Mon, 2009-11-23 at 18:01 +0200, Nikita Koshikov wrote: On Fri, 06 Nov 2009 18:42:49 -0500 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-11-06 at 10:27 +0200, Nikita Koshikov wrote: I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped .. (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 Yeah, something in your system has broken gdb.. Makes the debugging annoyingly difficult. You managed to get backtraces from the other bug. What did you do differently? Maybe you can get backtrace from this bug now too? I think gdb can't access memory due to gentoo kernel patches, so attaching to process is not working. Also, I can't change kernel on production server for testing purposes. As I wrote above, core files not present in users's homedir, even with patch you provided. I have wrote simple wrapper that removes maildirsize if the messages were expunged from user's mailbox and if user has non-default quota value. Is there any more convenient way to force dovecot recalculate quota size ? I have overview IMAP-QOUTA rfc, but seemed that it lacks such imap command, maybe some internal dovecot command exist? No, there's no other way. Clear, thanks.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 06 Nov 2009 18:42:49 -0500 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-11-06 at 10:27 +0200, Nikita Koshikov wrote: I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped .. (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 Yeah, something in your system has broken gdb.. Makes the debugging annoyingly difficult. I have wrote simple wrapper that removes maildirsize if the messages were expunged from user's mailbox and if user has non-default quota value. Is there any more convenient way to force dovecot recalculate quota size ? I have overview IMAP-QOUTA rfc, but seemed that it lacks such imap command, maybe some internal dovecot command exist?
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Mon, 2009-11-23 at 18:01 +0200, Nikita Koshikov wrote: On Fri, 06 Nov 2009 18:42:49 -0500 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-11-06 at 10:27 +0200, Nikita Koshikov wrote: I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped .. (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 Yeah, something in your system has broken gdb.. Makes the debugging annoyingly difficult. You managed to get backtraces from the other bug. What did you do differently? Maybe you can get backtrace from this bug now too? I have wrote simple wrapper that removes maildirsize if the messages were expunged from user's mailbox and if user has non-default quota value. Is there any more convenient way to force dovecot recalculate quota size ? I have overview IMAP-QOUTA rfc, but seemed that it lacks such imap command, maybe some internal dovecot command exist? No, there's no other way. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Thu, 05 Nov 2009 12:52:08 -0500 Timo Sirainen t...@iki.fi wrote: On Sat, 2009-10-31 at 10:42 +0200, Nikita Koshikov wrote: The patch helped with quotas, but it raises new error - segmentation error gdb backtrace would be helpful. But how to actually get it could be a bit difficult, since I guess kernel thinks expire-tool is a setuid program. There are two ways I guess: a) Apply attached diff1 and see if core dump gets written. Once you get a core, use gdb expire-tool core, bt full. This didn't create core file. b) If not, apply diff2 and start expire-tool. Then look up its pid and run gdb -p pid, cont, wait for crash, bt full. I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i686-pc-linux-gnu. Attaching to process 26407 Reading symbols from /usr/libexec/dovecot/expire-tool...(no debugging symbols found)...done. Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libpthread.so.0... (no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread 0xb7f02ac0 (LWP 26407)] Loaded symbols for /lib/libpthread.so.0 (no debugging symbols found) 0xe424 in __kernel_vsyscall () (gdb) cont Continuing. (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7f02ac0 (LWP 26407)] 0xb7f88749 in ?? () from /lib/libc.so.6 (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 (gdb) quit The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /usr/libexec/dovecot/expire-tool, process 26407
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 30 Oct 2009 13:16:47 -0400 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-10-30 at 14:03 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. See if the attached patch helps? I'm a bit afraid that it could also break something. If it does, there's really no easy way to get this fixed before v2.0. The patch helped with quotas, but it raises new error - segmentation error Here details: # /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh Info: Loading modules from directory: /usr/lib/dovecot/imap Info: Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib11_trash_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so --koshiko...@domain.com - have own quota in ldap, expire-tool is working fine: Info: expire: pattern=Trash type=expunge secs=2592000 Info: expire: pattern=Spam type=expunge secs=2592000 Info: auth input: quota_rule=*:bytes=629145600 Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=629145600 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=62914560 (10%) messages=0 Info: Quota warning: bytes=566231040 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/koshikov.n/data, index=, control=, inbox=/data/mail/domain.com/koshikov.n/data Info: Namespace: type=private, prefix=Company/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/koshikov.n/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 -- bunkin...@domain.com have default quota value, expire-tool is working fine: Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/bunkina.l Info: auth input: mail=maildir:~/data Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/bunkina.l/data, index=, control=, inbox=/data/mail/domain.com/bunkina.l/data Info: Namespace: type=private, prefix=Company/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/bunkina.l/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 -- podburt...@domain.com - have default quota, this account cause segmentation error, while running expire-tool: Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/podburtniy Info: auth input: mail=maildir:~/data Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Ошибка сегментирования The only difference with mailbox podburt...@domain.com that it's ldap mail field is different from samaccountname: podburt...@domain.com mail: podburt...@domain.com sAMAccountName: podburtn koshiko...@domain.com mail: koshiko...@domain.com sAMAccountName: koshikov.n But, I'm using only mail/maxstorage/useraccountcontrol attributes for mail staff. Users login to their accounts using full e-mail address and AD password.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 30 Oct 2009 13:16:47 -0400 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-10-30 at 14:03 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. See if the attached patch helps? I'm a bit afraid that it could also break something. If it does, there's really no easy way to get this fixed before v2.0. Note: I rechecked expire-tool behavior with version 1.2.4 and it's working the same way as 1.2.6, so my problem have more long history, than I thought.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
The patch helped with quotas, but it raises new error - segmentation error After some more tests, I find out that crash happens, while trying to proceed the third user, and the user's quota and other settings not important.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Thu, 29 Oct 2009 13:10:37 -0400 Timo Sirainen t...@iki.fi wrote: On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. So the quota_rule should be returned by userdb lookup from ldap, right? Yes, and it's working fine with deliver and general imap process, it only failed(reset to general quota_rule) after expire-rool.sh script finished his duties. Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data This should have listed quota_rule. The problematic user is sr, and it has quota_rule option(running with --test) (Thu Oct 29 07:45:18 2009) Info: auth input: quota_rule=*:bytes=1048576 ^ returned from ldap Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/sr Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/sr/data, index=, control=, inbox=/data/mail/domain.com/sr/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/sr/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: s...@domain.com/Spam: seq=1 uid=405: Expunge Info: s...@domain.com/Spam: seq=2 uid=406: Expunge Info: s...@domain.com/Spam: seq=3 uid=407: Expunge Info: s...@domain.com/Spam: timestamp 1256710764 (Wed Oct 28 08:19:24 2009) - 125698 (Sat Oct 31 11:06:40 2009) If dovecot -n output is needed, please let me know. If the above doesn't help, then yeah, dovecot -n and dovecot-ldap.conf contents. dovecot -n: # 1.2.6: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-gentoo-r4 i686 Gentoo Base System release 1.12.11.1 log_path: /var/log/dovecot/dovecot-error.log info_log_path: /var/log/dovecot/dovecot.log protocols: imaps managesieve ssl_cert_file: /etc/ssl/dovecot/imaps.crt ssl_key_file: /etc/ssl/dovecot/imaps.key login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(managesieve): /usr/libexec/dovecot/managesieve-login login_greeting: Server ready. login_processes_count: 20 login_max_processes_count: 512 mail_max_userip_connections(default): 20 mail_max_userip_connections(imap): 20 mail_max_userip_connections(managesieve): 10 first_valid_uid: 8 last_valid_uid: 8 first_valid_gid: 12 last_valid_gid: 12 mail_drop_priv_before_exec: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(managesieve): /usr/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota trash expire zlib autocreate virtual mail_plugins(imap): quota imap_quota trash expire zlib autocreate virtual mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail imap_client_workarounds(imap): delay-newmail imap_client_workarounds(managesieve): namespace: type: private separator: / location: maildir:~/data inbox: yes list: yes subscriptions: yes namespace: type: private separator: / prefix: Company/ location: virtual:/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ list: yes lda: postmaster_address: postmas...@domain.com hostname: mail.domain.com mail_plugins: quota trash expire sieve virtual quota_full_tempfail: yes sendmail_path: /usr/sbin/sendmail auth_socket_path: /var/run/dovecot/auth-master log_path: /var/log/dovecot/dovecot-deliver.log info_log_path: /var/log/dovecot/dovecot-deliver.log global_script_path: /etc/dovecot/sieve/default.sieve sieve_global_dir: /etc/dovecot/sieve auth default: mechanisms: plain login default_realm: domain.com cache_size: 10240 cache_negative_ttl: 0 user: dovecot_auth master_user_separator: * worker_max_count: 50 passdb: driver: passwd-file args: /etc/dovecot/passdb/master.pwd master: yes passdb: driver: passwd-file args: /etc/dovecot/passdb/users.pwd passdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf userdb: driver: prefetch userdb: driver: ldap args: /etc/dovecot/dovecot-userdb-ldap.conf userdb: driver: passwd-file args: /etc/dovecot/passdb/users.pwd socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 user: mail group: dovecot_auth master:
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Thu, 29 Oct 2009 13:10:37 -0400 Timo Sirainen t...@iki.fi wrote: On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. So the quota_rule should be returned by userdb lookup from ldap, right? One more clean example. For user koshiko...@domain.com I change quota in AD to 600M(default user quota is 512M,). After successful login to imap account, maildirsize is(first 2 lines): 629145600S 260658345 5484 So, quota value read from ldap database and applied to user's mailbox. Then I run /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh --test: Info: Loading modules from directory: /usr/lib/dovecot/imap Info: Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib11_trash_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: expire: pattern=Trash type=expunge secs=2592000 Info: expire: pattern=Spam type=expunge secs=2592000 Info: auth input: quota_rule=*:bytes=629145600 Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/koshikov.n/data, index=, control=, inbox=/data/mail/domain.com/koshikov.n/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/koshikov.n/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: koshiko...@domain.com/Spam: seq=1 uid=1933: Expunge Info: koshiko...@domain.com/Spam: timestamp 1256902423 (Fri Oct 30 13:33:43 2009) - 1256903611 (Fri Oct 30 13:53:31 2009) Quota_rule are different from auth section and quota root\rule section. After expire-tool expunges e-mails, the maildirsize file become: 524288000S 260686038 5487 Which is default quota_rule value, not from ldap database.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 2009-10-30 at 14:03 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. See if the attached patch helps? I'm a bit afraid that it could also break something. If it does, there's really no easy way to get this fixed before v2.0. diff -r a0d72e0d88dd src/plugins/expire/expire-tool.c --- a/src/plugins/expire/expire-tool.c Thu Oct 29 17:40:33 2009 -0400 +++ b/src/plugins/expire/expire-tool.c Fri Oct 30 13:15:45 2009 -0400 @@ -52,6 +52,7 @@ /* user no longer exists */ return 0; } + module_dir_init(modules); ctx-mail_user = mail_user_init(user); mail_user_set_home(ctx-mail_user, getenv(HOME)); @@ -64,6 +65,7 @@ { mail_user_unref(ctx-mail_user); i_free_and_null(ctx-user); + module_dir_deinit(modules); } static int @@ -265,8 +267,6 @@ mail_storage_register_all(); mailbox_list_register_all(); - module_dir_init(modules); - expire_get_global_mail_ids(); base_dir = getenv(BASE_DIR); signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. So the quota_rule should be returned by userdb lookup from ldap, right? Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data This should have listed quota_rule. If dovecot -n output is needed, please let me know. If the above doesn't help, then yeah, dovecot -n and dovecot-ldap.conf contents. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin per domain
On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote: My problem is that I have no idea how to create the userdb.sh From my previous mail: Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. So start with copypasting your vchkpw-wrapper.sh. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin per domain
Hi Timo, I copied vchkpw-wrapper.sh as userdb.sh, being as follows: userdb.sh #!/bin/bash DOMAIN=`echo $VPOPUSER|sed s/^.*@//` if [ $DOMAIN = operaciones.qnet.com.pe ]; then export USERDB_AUTOCREATE=INBOX.Spam export USERDB_AUTOSUBSCRIBE=INBOX.Spam export USERDB_EXPIRE=INBOX.Spam 1 INBOX.Spam.* 1 export USERDB_EXPIRE_DICT=proxy::expire export EXTRA=USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT fi unset USER exec $* When I run the command /usr/local/sbin/dovecot --exec-mail ext /usr/local/bin/expire-tool.sh --test I get the same error message Fatal: expire and expire_altmove settings not set expire-tool.sh #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} /usr/local/libexec/dovecot/expire-tool $1 dovecot --build-options Build options: ioloop=epoll notify=dnotify ipv6 openssl Mail storages: cydir dbox maildir mbox raw shared SQL drivers: mysql Passdb: checkpassword pam passwd passwd-file shadow sql Userdb: nss passwd passwd-file prefetch sql static What's wrong? Thanks Jose Luis dovecot -n # 1.2.6: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmas...@example.com auth default: debug: yes passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch userdb: driver: checkpassword args: /usr/local/bin/userdb.sh socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf Subject: Re: [Dovecot] Expire plugin per domain From: t...@iki.fi To: jolumape...@hotmail.com CC: dovecot@dovecot.org Date: Tue, 20 Oct 2009 16:25:29 -0400 On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote: My problem is that I have no idea how to create the userdb.sh From my previous mail: Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. So start with copypasting your vchkpw-wrapper.sh. _ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
Re: [Dovecot] Expire plugin per domain
On Tue, 2009-10-20 at 15:43 -0500, Jose Luis Marin Perez wrote: DOMAIN=`echo $VPOPUSER|sed s/^.*@//` .. vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. The above explains the first problem... Sorry, but I've spent already way too much time answering your questions. My previous email+wiki contains all the information necessary to write the script. If you can't do it yourself, find/pay someone else who isn't as busy as me. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin per domain
Thanks Timo From: t...@iki.fi To: jolumape...@hotmail.com Date: Tue, 20 Oct 2009 16:46:52 -0400 CC: dovecot@dovecot.org Subject: Re: [Dovecot] Expire plugin per domain On Tue, 2009-10-20 at 15:43 -0500, Jose Luis Marin Perez wrote: DOMAIN=`echo $VPOPUSER|sed s/^.*@//` .. vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. The above explains the first problem... Sorry, but I've spent already way too much time answering your questions. My previous email+wiki contains all the information necessary to write the script. If you can't do it yourself, find/pay someone else who isn't as busy as me. _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
Dear Timo Finally and thanks to you, I could install Dovecot 1.2.6 with support for userdb checkpassword How can I configure the script userdb.sh? Thanks Jose Luis dovecot -n # 1.2.6: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmas...@example.com auth default: debug: yes passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch userdb: driver: checkpassword args: /usr/local/bin/userdb.sh socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf Subject: Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script From: t...@iki.fi To: jolumape...@hotmail.com CC: dovecot@dovecot.org Date: Thu, 15 Oct 2009 21:21:02 -0400 On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote: I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: .. /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test The problem is that vchkpw-wrapper.sh is now run only when user is authenticating. expire-tool doesn't authenticate, it only does userdb lookup. So you'll need to have the script run for userdb lookups too: passdb checkpassword { .. } userdb prefetch { } userdb checkpassword { args = /usr/local/bin/userdb.sh } Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [Dovecot] Expire issue
Timo Sirainen wrote: On Thu, 2009-10-15 at 15:50 +0200, Emmanuel Gonzalez wrote: Hello guys, I'm trying to configure de expire plug in, all the configuration seems to be right but when I launch # /opt/dovecot/sbin/dovecot --exec-mail ext /opt/dovecot/libexec/dovecot/expire-tool --test Error: userdb(u...@mydomain.it) didn't return uid What Dovecot version? I think I fixed this already. My dovecot version is 1.1.13 -- Emmanuel Gonzalez
Re: [Dovecot] Expire issue
On Oct 16, 2009, at 6:29 AM, Emmanuel Gonzalez wrote: Timo Sirainen wrote: On Thu, 2009-10-15 at 15:50 +0200, Emmanuel Gonzalez wrote: Hello guys, I'm trying to configure de expire plug in, all the configuration seems to be right but when I launch # /opt/dovecot/sbin/dovecot --exec-mail ext /opt/dovecot/libexec/ dovecot/expire-tool --test Error: userdb(u...@mydomain.it) didn't return uid What Dovecot version? I think I fixed this already. My dovecot version is 1.1.13 Yes, this was fixed in 1.1.15. And 1.1.17 had some other expire fixes.
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
Hi timo, This is the error that comes when adding userdb checkpassword dovecot: Oct 16 10:13:53 Fatal: auth(default): Unknown userdb driver 'checkpassword' (typo, or Dovecot was built without support for it? Check with dovecot --build-options) dovecot: Oct 16 10:13:53 Fatal: Auth process died too early - shutting down Running dovecot - build-options Build options: epoll ioloop = notify = dnotify ipv6 openssl Mail Storage: mbox maildir raw cydir dbox SQL drivers: mysql Passdb: vpopmail sql checkpassword Userdb: vpopmail sql prefetch Checkpassword not compiled for userdb. Excuse the dumb question, with that option adding to compile dovecot userdb checkpassword? No information found about this. Thanks Jose Luis From: t...@iki.fi To: jolumape...@hotmail.com Date: Thu, 15 Oct 2009 21:21:02 -0400 CC: dovecot@dovecot.org Subject: Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote: I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: .. /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test The problem is that vchkpw-wrapper.sh is now run only when user is authenticating. expire-tool doesn't authenticate, it only does userdb lookup. So you'll need to have the script run for userdb lookups too: passdb checkpassword { .. } userdb prefetch { } userdb checkpassword { args = /usr/local/bin/userdb.sh } Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
On Fri, 2009-10-16 at 10:37 -0500, Jose Luis Marin Perez wrote: Hi timo, This is the error that comes when adding userdb checkpassword dovecot: Oct 16 10:13:53 Fatal: auth(default): Unknown userdb driver 'checkpassword' (typo, or Dovecot was built without support for it? Check with dovecot --build-options) Oh. userdb checkpassword is only in Dovecot v1.2. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire issue
On Thu, 2009-10-15 at 15:50 +0200, Emmanuel Gonzalez wrote: Hello guys, I'm trying to configure de expire plug in, all the configuration seems to be right but when I launch # /opt/dovecot/sbin/dovecot --exec-mail ext /opt/dovecot/libexec/dovecot/expire-tool --test Error: userdb(u...@mydomain.it) didn't return uid What Dovecot version? I think I fixed this already. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
Stop sending the same mail every few hours. On Thu, 2009-10-15 at 18:14 -0500, Jose Luis Marin Perez wrote: Dear Timo, I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: #!/bin/bash DOMAIN=`echo $VPOPUSER|sed s/^.*@//` if [ $DOMAIN = operaciones.qnet.com.pe ]; then export USERDB_AUTOCREATE=INBOX.Spam export USERDB_AUTOSUBSCRIBE=INBOX.Spam export USERDB_EXPIRE=INBOX.Spam 1 INBOX.Spam.* 1 export USERDB_EXPIRE_DICT=proxy::expire export EXTRA=USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT fi unset USER exec $* In the database no problem mysql select * from expires; +---+--+ | mailbox | expire_stamp | +---+--+ | jma...@operaciones.qnet.com.pe/INBOX.Spam | 1255701608 | +---+--+ 1 row in set (0.00 sec) But when you run the command /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test Displays the following message Fatal: expire and expire_altmove settings not set That may be happening? Thanks Jose Luis dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: debug: yes passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u userdb: driver: vpopmail socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore expire_dict: proxy::expire mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf _ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin: wrong mailbox separators in database?
http://hg.dovecot.org/dovecot-1.2/rev/00757d350812 probably helps? signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote: I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: .. /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test The problem is that vchkpw-wrapper.sh is now run only when user is authenticating. expire-tool doesn't authenticate, it only does userdb lookup. So you'll need to have the script run for userdb lookups too: passdb checkpassword { .. } userdb prefetch { } userdb checkpassword { args = /usr/local/bin/userdb.sh } Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire Plugin Configuration Question
On Oct 4, 2009, at 7:50 PM, Roland Roberts wrote: I am very confused looking at the expires plugin and its configuration. What is confusing me the most is that it appears that I have to configure expiration globally, meaning, for example, that the Trash mailbox expiration interval is the same regardless of the user. What I really am looking for is per-user configurable rules. Maybe for v2.0.
Re: [Dovecot] Expire Plugin Configuration Question
Charles Marcus wrote: On 10/4/2009 7:50 PM, Roland Roberts wrote: I am very confused looking at the expires plugin and its configuration. What is confusing me the most is that it appears that I have to configure expiration globally, meaning, for example, that the Trash mailbox expiration interval is the same regardless of the user. What I really am looking for is per-user configurable rules. Hmmm... interesting. I don't think you can use extra fields for this now, but I wonder if it would be possible to modify expire plugin to do so? Well, it's a bit disappointing to hear that it can't be done, but I'm not surprised since that's what I was inferring from the documentation. I was hoping to be able to configure a uniform expiration policy, just like I currently use procmail to file my mail without having to have a separate config for each client. roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises rol...@rlenter.com6818 Madeline Court rol...@astrofoto.org Brooklyn, NY 11220
Re: [Dovecot] Expire Plugin Configuration Question
On 10/4/2009, Roland Roberts (rol...@astrofoto.org) wrote: I was hoping to be able to configure a uniform expiration policy, just like I currently use procmail to file my mail without having to have a separate config for each client. What I had said was I don't think (maybe you can) that you can do it on a per user basis... If by 'uniform' you mean 'global', currently all you *can* do is set a global policy... -- Best regards, Charles
Re: [Dovecot] Expire Plugin Configuration Question
Charles Marcus wrote: On 10/4/2009, Roland Roberts (rol...@astrofoto.org) wrote: I was hoping to be able to configure a uniform expiration policy, just like I currently use procmail to file my mail without having to have a separate config for each client. What I had said was I don't think (maybe you can) that you can do it on a per user basis... If by 'uniform' you mean 'global', currently all you *can* do is set a global policy... The documentation doesn't say anything about per-user which implies it can't be done. I would very much like to be wrong on that. By uniform, I don't mean global. I mean that the policy is set (by me on each of my folders) once instead of once per mail client. roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises rol...@rlenter.com6818 Madeline Court rol...@astrofoto.org Brooklyn, NY 11220
Re: [Dovecot] Expire plugin: wrong mailbox separators in database?
Hate to bump this, but is there nobody who uses the expire plugin and can confirm my observations? I'd love to use the expire plugin to delete old messages filed in spam folders but as it is now I can't get it to work with the wrong mailbox separators in the table entries. Andreas -- Andreas Ntaflos GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC 7E65 397C E2A8 090C A9B4 signature.asc Description: This is a digitally signed message part.
Re: [Dovecot] Expire plugin: wrong mailbox separators in database?
Andreas Ntaflos wrote: Hate to bump this, but is there nobody who uses the expire plugin and can confirm my observations? I'd love to use the expire plugin to delete old messages filed in spam folders but as it is now I can't get it to work with the wrong mailbox separators in the table entries. Andreas Your observations look reasonable to me. Looks like the expire plugin needs to be fixed so that other separator characters can be used. -- -Eric 'shubes'
Re: [Dovecot] expire plugin: columns not uniq
On Mon, 24 Aug 2009 13:33:15 -0400 Timo Sirainen t...@iki.fi wrote: On Mon, 2009-08-24 at 13:27 -0400, Timo Sirainen wrote: CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working. That looks correct to me. Sorry for such lately response, I have just returned from vacation. Oh, except there's a small race condition if the first row is being added at the same time by two processes. That's why the PostgreSQL trigger is so much more complex. But it should be somewhat rare I guess.. Unless SQLite has some locks that prevent that? Anyway I was thinking that two processes run the UPDATE part of the trigger and then both try to INSERT. One of them succeeds and the other one fails. But the row gets added anyway and the timestamp is the same anyway, so it probably doesn't matter all that much, just logs an error. As far as I know, sqlite permits to write database changes(INSERT,UPDATE or DELETE) to only 1 process at the same time and when process is updating data - sqlite table is locking. This might be OS queue processing, because sqlite have no master process for handling such racing. In my understanding, if two identical INSERTs will be passed to database(and the record already exists) - trigger's UPDATE will be run twice, but consistently. My admissions can be faulty and sqlite experts should shed some light on this situation. The above trigger is working about a week in my setup - I have checked error log for this period - there is nothing related to database issues.
Re: [Dovecot] expire plugin: columns not uniq
On Fri, 2009-08-21 at 17:02 +0300, Nikita Koshikov wrote: Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Maybe someone family with sqlite will say how to make this trigger better and constrain check field existence before doing UPDATE CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working. That looks correct to me. I'll add it to the wiki page. A similar trigger could be used for dict quota too. So now that SQLite is working, I'll just start deprecating Berkeley DB support even more strongly. Thanks. :) signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin: columns not uniq
On Mon, 2009-08-24 at 13:27 -0400, Timo Sirainen wrote: CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working. That looks correct to me. Oh, except there's a small race condition if the first row is being added at the same time by two processes. That's why the PostgreSQL trigger is so much more complex. But it should be somewhat rare I guess.. Unless SQLite has some locks that prevent that? Anyway I was thinking that two processes run the UPDATE part of the trigger and then both try to INSERT. One of them succeeds and the other one fails. But the row gets added anyway and the timestamp is the same anyway, so it probably doesn't matter all that much, just logs an error. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin: columns not uniq
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 19 Aug 2009, Nikita Koshikov wrote: How can I solve this ? and why expire plugin is trying to use INSERT, instead of UPDATE ? Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Unfortunately, there is no UPDATE OR INSERT in SQL and it is hard to simulate. Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSo5fbnWSIuGy1ktrAQKQdQgAs1fioq/x86JNb9L7SvGnU9wPOUICilsI RcY+PrsMzGxdRShlnDhEIJGRlbzr7jHDhDhMfej+TGP9XqBFPqBphVxT8JIJmGXz Z4qEvwLoyuSKxWikLxVLaslDPYPu2tjmvKt+HWaLgev7ecwFF8NoKBHhWV6fR3x9 o/xVVcj6hM38SkiGc6+t27OC5ch6Tq5Vqmau4QIB7fkN8bA8IoBU17rM0eW4k80m 7nKTVsPqFcDKlmes2d5vJVlCYg+NCy69RVIZEFQwOJahBjveSvJsXWnhks9e0nEk PmtMPMUFHOvfe+4KfK2GFxAPCznOSrxfgMuUewXnENCgLtXrox+zPA== =8vpx -END PGP SIGNATURE-
Re: [Dovecot] expire plugin: columns not uniq
On Fri, 21 Aug 2009 10:48:42 +0200 (CEST) Steffen Kaiser skdove...@smail.inf.fh-brs.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 19 Aug 2009, Nikita Koshikov wrote: How can I solve this ? and why expire plugin is trying to use INSERT, instead of UPDATE ? Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Thank for your answer. I'll dig in this direction. Unfortunately, there is no UPDATE OR INSERT in SQL and it is hard to simulate. You mean in dovecot expire plugin or where ? Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSo5fbnWSIuGy1ktrAQKQdQgAs1fioq/x86JNb9L7SvGnU9wPOUICilsI RcY+PrsMzGxdRShlnDhEIJGRlbzr7jHDhDhMfej+TGP9XqBFPqBphVxT8JIJmGXz Z4qEvwLoyuSKxWikLxVLaslDPYPu2tjmvKt+HWaLgev7ecwFF8NoKBHhWV6fR3x9 o/xVVcj6hM38SkiGc6+t27OC5ch6Tq5Vqmau4QIB7fkN8bA8IoBU17rM0eW4k80m 7nKTVsPqFcDKlmes2d5vJVlCYg+NCy69RVIZEFQwOJahBjveSvJsXWnhks9e0nEk PmtMPMUFHOvfe+4KfK2GFxAPCznOSrxfgMuUewXnENCgLtXrox+zPA== =8vpx -END PGP SIGNATURE-
Re: [Dovecot] expire plugin: columns not uniq
Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Maybe someone family with sqlite will say how to make this trigger better and constrain check field existence before doing UPDATE CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working.
Re: [Dovecot] expire plugin: columns not uniq
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Aug 2009, Nikita Koshikov wrote: You mean in dovecot expire plugin or where ? No, in general. If one wants some data in a DB, but update if already present. If you re-programm the TRIGGER in the client, you need to lock the whole table, if you want to overcome all race conditions and also don't want any errors logged (at least with postgres). Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSo62cHWSIuGy1ktrAQLimQf/QYdrEX3y94bK1jmMk4T+bIIMcjmzESe5 0o+W0AFSOifWop8JOHZy1YJUXa5gkGnhg09ar0zC9UQ8T4J97xz0ORfe3UHmisKv xh2zJ8lhw1OviQ4qrPcSot1/D/SQ/xdPKbBaaD1S7k+E0zK44P74PHGAvRsx+tUZ 3BR0U73LFtAiAhvW/y2rseo/vIuXBBSPthBK/nExiiODN9P9Vq3iOczfZwVUkVmo cNwArCwjkBGk6dGRnfGEoPKWsa/qFVHqQPjwen7j0T2ak58Vfm9Vc3pGmMSequGh MIjcOHcmpcF6AAhsZQIoYewgVtQQ+aXY9T4zQo6JbLCEyF7RCs/yRg== =cinD -END PGP SIGNATURE-
Re: [Dovecot] expire plugin: columns not uniq
No, in general. If one wants some data in a DB, but update if already present. If you re-programm the TRIGGER in the client, you need to lock the whole table, if you want to overcome all race conditions and also don't want any errors logged (at least with postgres). Thanks for explanation. I'm not so aware in databases, but if trigger will be programmed on client side - this will make code more portable(in case of database choicing) and what is the less evil - locking or portability... In any case, thanks for reply, it helps me much.