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 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 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 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 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 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 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 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.
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3 solved
Robert Schetterer schrieb: Timo Sirainen schrieb: On Mon, 2009-08-10 at 20:04 +0200, Robert Schetterer wrote: as far i remember there was root .. yes of course i am having variables in namespaces i think i need them for my setup expire-tool is currently incompatible with variables anywhere. v2.0 fixes this, but with v1.x you can't use them. namespace private { separator = / prefix = location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ location = maildir:~/ should work here just fine. All of your directories point to the same one, so there's no need to specify them separately. list = yes hidden = no subscriptions = yes } namespace private { prefix = virtual/ separator = / location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++ This is ok as it is. hidden = yes list = no subscriptions= no } namespace private { prefix = RealMails/ separator = / list = no hidden = yes location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ } Here again it's the same. Actually you should just remove the location setting from both RealMails/ and namespaces, so it'll just default to mail_location setting. only in the first default namespace, changing others may crash with pop3 downloading special imap folders As long as home points to the right directory there shouldn't be any problems. ok i ll try, and report Hi Timo, this worked, mail was deleted ,so the thread is solved i didnt tested other functions deeply yet with new locations but on the first look it should be ok thx !!! -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3
Robert Schetterer schrieb: Timo Sirainen schrieb: On Tue, 2009-08-04 at 10:22 +0200, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Oh, right, this is the problem. You can't use %variables in mail_location setting. They get expanded too early. Since you're returning home anyway, use: mail_location = maildir:~/ HI Timo, ok i try this and report Hi, Timo sorry to say setting mail_location = maildir:~/ does not change anything mail is still not deleted, latest test were with 1.2.3 -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3
On Aug 10, 2009, at 11:17 AM, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual// root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual// root/ .. setting mail_location = maildir:~/ does not change anything mail is still not deleted, latest test were with 1.2.3 What does it log now?
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3
Timo Sirainen schrieb: On Mon, 2009-08-10 at 20:04 +0200, Robert Schetterer wrote: as far i remember there was root .. yes of course i am having variables in namespaces i think i need them for my setup expire-tool is currently incompatible with variables anywhere. v2.0 fixes this, but with v1.x you can't use them. namespace private { separator = / prefix = location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ location = maildir:~/ should work here just fine. All of your directories point to the same one, so there's no need to specify them separately. list = yes hidden = no subscriptions = yes } namespace private { prefix = virtual/ separator = / location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++ This is ok as it is. hidden = yes list = no subscriptions= no } namespace private { prefix = RealMails/ separator = / list = no hidden = yes location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ } Here again it's the same. Actually you should just remove the location setting from both RealMails/ and namespaces, so it'll just default to mail_location setting. only in the first default namespace, changing others may crash with pop3 downloading special imap folders As long as home points to the right directory there shouldn't be any problems. ok i ll try, and report -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
On Tue, 2009-08-04 at 10:22 +0200, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Oh, right, this is the problem. You can't use %variables in mail_location setting. They get expanded too early. Since you're returning home anyway, use: mail_location = maildir:~/ signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Timo Sirainen schrieb: On Tue, 2009-08-04 at 10:22 +0200, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Oh, right, this is the problem. You can't use %variables in mail_location setting. They get expanded too early. Since you're returning home anyway, use: mail_location = maildir:~/ HI Timo, ok i try this and report -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Robert Schetterer schrieb: Timo Sirainen schrieb: On Aug 3, 2009, at 3:52 AM, Robert Schetterer wrote: /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh Disable this for now and tomorrow just run the --test first manually, save its output, then if it seemed ok run without --test. ok i will do /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test tommorow and then /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh savin the outputs and additional looking in sql and imap savedate manually after deletetion time Hi Timo, did that exactly in that row as you see the mail didnt get deleted ( stays in filesystem, and is shown to thunderbird ) but it expired in sql dict rightly but was not deleted /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so Info: Quota root: name= backend=dict args=:proxy::quotadict Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Info: Quota warning: bytes=0 (80%) messages=0 command=/usr/local/bin/quota-warning.sh 80 Info: expire: pattern=Trash type=expunge secs=86400 Info: auth input: home=/usr/local/virtual/schetterer.com/rob...@schetterer.com/ Info: auth input: quota_rule=*:bytes=1024 Info: auth input: quota_rule2=Trash:storage=50240 Info: auth input: quota_rule3=Sent:storage=50240 Info: auth input: quota_rule4=Drafts:storage=50240 Info: auth input: quota_rule5=Templates:storage=50240 Info: auth input: quota_rule6=Junk:storage=50240 Info: auth input: mail=maildir:/usr/local/virtual/schetterer.com/rob...@schetterer.com/ Info: auth input: namespace_1_inbox=yes Info: auth input: uid=1001 Info: auth input: gid=1001 Info: dict quota: user=rob...@schetterer.com, uri=proxy::quotadict, noenforcing=0 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Info: maildir++: root=/usr/local/virtual//root, index=, control=, inbox=/usr/local/virtual//root Info: acl: initializing backend with data: vfile Info: acl: acl username = rob...@schetterer.com Info: acl: owner = 1 Info: acl vfile: Global ACL directory: (null) Info: Namespace: type=private, prefix=virtual/, sep=/, inbox=no, hidden=yes, list=no, subscriptions=no Info: virtual: data=/etc/dovecot/virtual:LAYOUT=maildir++ Info: maildir++: root=/etc/dovecot/virtual, index=, control=, inbox= Info: acl: initializing backend with data: vfile Info: acl: acl username = rob...@schetterer.com Info: acl: owner = 1 Info: acl vfile: Global ACL directory: (null) Info: Namespace: type=private, prefix=RealMails/, sep=/, inbox=no, hidden=yes, list=no, subscriptions=yes Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Info: maildir++: root=/usr/local/virtual//root, index=, control=, inbox=/usr/local/virtual//root Info: acl: initializing backend with data: vfile Info: acl: acl username = rob...@schetterer.com Info: acl: owner = 1 Info: acl vfile: Global ACL directory: (null) Info: Namespace: type=shared, prefix=shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no Info: shared: root=, index=, control=, inbox= Info: Namespace : Using permissions from /usr/local/virtual//root: mode=0700 gid=-1 Info: acl vfile: file /usr/local/virtual//root/.Trash/dovecot-acl not found Info: rob...@schetterer.com/Trash: no messages left select mailbox, from_unixtime(expire_stamp), username from expireplugin; +-+-+---+ | mailbox | from_unixtime(expire_stamp) | username | +-+-+---+ | Trash | 2009-08-04 09:40:21 | rob...@schetterer.com | +-+-+---+ 1 row in set (0.00 sec) 3 select Trash * OK [CLOSED] * FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk \*)] Flags permitted. * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240758078] UIDs valid * OK [UIDNEXT 89]
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Robert Schetterer schrieb: Timo Sirainen schrieb: On Fri, 2009-07-31 at 17:21 +0200, Robert Schetterer wrote: Hi Timo, so now its clear, the mail did not got deleted if i now do Info: rob...@schetterer.com/Trash: no messages left So, it worked? no messages left means if you didn't give --test it would have deleted all messages from the mailbox. Hi Timo, no it didnt work i repeated the test since then twice the mail was not deleted Hi Timo, no it didnt work i repeated the test since then twice the mail was not deleted -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Timo Sirainen schrieb: On Aug 3, 2009, at 3:26 AM, Robert Schetterer wrote: Timo Sirainen schrieb: On Fri, 2009-07-31 at 17:21 +0200, Robert Schetterer wrote: Hi Timo, so now its clear, the mail did not got deleted if i now do Info: rob...@schetterer.com/Trash: no messages left So, it worked? no messages left means if you didn't give --test it would have deleted all messages from the mailbox. Hi Timo, no it didnt work i repeated the test since then twice the mail was not deleted Well, that message says that at the time there was no messages left in the Trash. Do you mean that there were? Show me now what it says with: - expire-tool --test - FETCH 1 X-SAVEDATE shows in a mailbox that should have expired messages - SELECT * FROM .. showing the database row for the mailbox that should have expired messages Ok Timo, i start a new test to make sure mysql select mailbox, from_unixtime(expire_stamp), username from expireplugin; +-+-+---+ | mailbox | from_unixtime(expire_stamp) | username | +-+-+---+ | Trash | 2009-08-04 09:40:21 | rob...@schetterer.com | +-+-+---+ 1 row in set (0.00 sec) 1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH ACL RIGHTS=texk QUOTA] Logged in 2 select Trash * FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk \*)] Flags permitted. * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240758078] UIDs valid * OK [UIDNEXT 89] Predicted next UID * OK [HIGHESTMODSEQ 123] 2 OK [READ-WRITE] Select completed. 3 fetch 1:* (internaldate x-savedate) * 1 FETCH (INTERNALDATE 03-Aug-2009 09:40:16 +0200 X-SAVEDATE 03-Aug-2009 09:40:21 +0200) 3 OK Fetch completed. /usr/lib/dovecot/expire-tool.sh #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} MAIL_PLUGINS=${MAIL_PLUGINS//imap_acl/} exec ${0%.sh} $@ /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so Info: Quota root: name= backend=dict args=:proxy::quotadict Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Info: Quota warning: bytes=0 (80%) messages=0 command=/usr/local/bin/quota-warning.sh 80 Info: expire: pattern=Trash type=expunge secs=86400 Info: rob...@schetterer.com/Trash: stop, expire time in future: Tue Aug 4 09:40:21 2009 /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh so lets see what happens tommorow and repeat the --test as well as the mysql test and internal savedate test after deletion time -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
On Aug 3, 2009, at 3:52 AM, Robert Schetterer wrote: /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh Disable this for now and tomorrow just run the --test first manually, save its output, then if it seemed ok run without --test.
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Timo Sirainen schrieb: On Aug 3, 2009, at 3:52 AM, Robert Schetterer wrote: /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh Disable this for now and tomorrow just run the --test first manually, save its output, then if it seemed ok run without --test. ok i will do /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test tommorow and then /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh savin the outputs and additional looking in sql and imap savedate manually after deletetion time -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
On Fri, 2009-07-31 at 17:21 +0200, Robert Schetterer wrote: Hi Timo, so now its clear, the mail did not got deleted if i now do Info: rob...@schetterer.com/Trash: no messages left So, it worked? no messages left means if you didn't give --test it would have deleted all messages from the mailbox. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Robert Schetterer schrieb: Timo Sirainen schrieb: On Thu, 2009-07-23 at 23:42 +0200, Robert Schetterer wrote: Hi Timo, all of my tests fail with expire plugin, mail simply not get deleted i cant find any stuff in the logs why it does not or should not work. Try with 1.2.2 and check the mails' save dates now that you have the FETCH X-SAVEDATE command available. Hi Timo, upgraded last night and tested X-SAVEDATE is now available, before it was not so lets wait and see, if it now works, i will report Hi Timo, still mails get not deleted i just did a new test mysql select mailbox, from_unixtime(expire_stamp), username from expireplugin; +-+-+---+ | mailbox | from_unixtime(expire_stamp) | username | +-+-+---+ | Trash | 2009-07-31 14:18:47 | rob...@schetterer.com | +-+-+---+ 1 row in set (0.00 sec) 2 select Trash * FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk \*)] Flags permitted. * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240758078] UIDs valid * OK [UIDNEXT 85] Predicted next UID * OK [HIGHESTMODSEQ 109] 2 OK [READ-WRITE] Select completed. 3 fetch 1:* (internaldate x-savedate) * 1 FETCH (INTERNALDATE 30-Jul-2009 14:18:26 +0200 X-SAVEDATE 30-Jul-2009 14:18:47 +0200) 3 OK Fetch completed. /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so Info: Quota root: name= backend=dict args=:proxy::quotadict Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Info: Quota warning: bytes=0 (80%) messages=0 command=/usr/local/bin/quota-warning.sh 80 Info: expire: pattern=Trash type=expunge secs=86400 Info: rob...@schetterer.com/Trash: stop, expire time in future: Fri Jul 31 14:18:47 2009 /usr/lib/dovecot/expire-tool.sh #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} MAIL_PLUGINS=${MAIL_PLUGINS//imap_acl/} #MAIL_PLUGINS=${MAIL_PLUGINS//virtual/} exec ${0%.sh} $@ i still speculate the problem might be in the virtual plugin but anyway if its load or not by the script mails dont get deleted additional i integrated userdb_home userdb_mail in password_query but this also did not helped ( so perhaps some config stuff helps for debug ) password_query = SELECT username as user, password, \ 1001 as userdb_uid, \ 1001 as userdb_gid, \ /usr/local/virtual/%u/ AS userdb_home, \ maildir:/usr/local/virtual/%u/ AS userdb_mail \ FROM mailbox WHERE username = '%u' AND active = '1' AND (imap_allowed = '1' or '%Ls' = 'pop3') user_query = SELECT concat('/usr/local/virtual/', maildir) AS home, \ concat('*:bytes=', mailbox.quota) AS quota_rule, \ #when saving to Trash mailbox the user gets additional 50MB Trash:storage=50240 AS quota_rule2, \ #when saving to Sent mailbox the user gets additional 50MB Sent:storage=50240 AS quota_rule3, \ #when saving to Drafts mailbox the user gets additional 50MB Drafts:storage=50240 AS quota_rule4, \ #when saving to Templates mailbox the user gets additional 50MB Templates:storage=50240 AS quota_rule5, \ #when saving to Junk mailbox the user gets additional 50MB Junk:storage=50240 AS quota_rule6, \ #ignore quota on shared #shared:ignore AS quota_rule7, \ concat('maildir:/usr/local/virtual/', maildir) AS mail, \ CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS namespace_1_inbox, \ CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS namespace_2_inbox, \ 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active = '1' namespace private { separator = / prefix = location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/%d/%u/ list = yes hidden = no subscriptions = yes } namespace private { prefix = virtual/ separator = / location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++ hidden = yes list = no subscriptions= no } namespace private { prefix = RealMails/ separator = / list = no hidden = yes location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/%d/%u/ } mail_location =
Re: [Dovecot] expire plugin no delete 1.2.1
Timo Sirainen schrieb: On Thu, 2009-07-23 at 23:42 +0200, Robert Schetterer wrote: Hi Timo, all of my tests fail with expire plugin, mail simply not get deleted i cant find any stuff in the logs why it does not or should not work. Try with 1.2.2 and check the mails' save dates now that you have the FETCH X-SAVEDATE command available. Hi Timo, upgraded last night and tested X-SAVEDATE is now available, before it was not so lets wait and see, if it now works, i will report -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1
On Thu, 2009-07-23 at 23:42 +0200, Robert Schetterer wrote: Hi Timo, all of my tests fail with expire plugin, mail simply not get deleted i cant find any stuff in the logs why it does not or should not work. Try with 1.2.2 and check the mails' save dates now that you have the FETCH X-SAVEDATE command available. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin - where to start?
On Wed, 2009-07-15 at 21:35 +0100, Frank Leonhardt wrote: I'm running Dovecot 1.1.3 I'm pretty sure expire plugin is broken with this version. v1.1.17 had the last fixes to it. http://wiki.dovecot.org/Plugins/Expire Leaves me to scared to try anything. It's all working and I don't want to break it or delete anyone's mail. The problem that the wiki isn't accurate to the version I'm running. For example /usr/libexec/dovecot/expire-tool.sh doesn't exist. The wiki is written a bit badly there. The expire-tool.sh is included in the v1.2.x section in the wiki page. I'll try to clean it up a bit. Am I being paranoid? Possibly, but I don't want to be posting a Help! I've wrecked my config and deleted all my friend's mail type message. (Okay, I'd take a backup first). So could some kind person point me at the latest documentation? The problem has never been that expire plugin deletes mails too early. It's always been that it doesn't seem to delete anything. :) signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin - where to start?
Timo Sirainen Wrote On Wed, 2009-07-15 at 21:35 +0100, Frank Leonhardt wrote: I'm running Dovecot 1.1.3 I'm pretty sure expire plugin is broken with this version. v1.1.17 had the last fixes to it. http://wiki.dovecot.org/Plugins/Expire Leaves me to scared to try anything. It's all working and I don't want to break it or delete anyone's mail. The problem that the wiki isn't accurate to the version I'm running. For example /usr/libexec/dovecot/expire-tool.sh doesn't exist. The wiki is written a bit badly there. The expire-tool.sh is included in the v1.2.x section in the wiki page. I'll try to clean it up a bit. Am I being paranoid? Possibly, but I don't want to be posting a Help! I've wrecked my config and deleted all my friend's mail type message. (Okay, I'd take a backup first). So could some kind person point me at the latest documentation? The problem has never been that expire plugin deletes mails too early. It's always been that it doesn't seem to delete anything. --- Many thanks I shall forget the expire plugin for now and worry about upgrading the whole system instead. Off to do some more reading.
Re: [Dovecot] expire plugin with 1.2 cronjob undefined symbol: capability_string / ignoring virtual namespace ?
Robert Schetterer schrieb: dovecot@dovecot.org schrieb: Hi, this looks like one of my queued problems: On AIX I get a message that indicates missing global symbols. For example client_read_args. It is defined in src/imap/client.c but just linked at build time to the imap executable, while the expire-tool does not provide this function. Does expire-tool require the plugins quota and quota_imap at all? Is it the same issue or just another AIX specific problem I've to fix? :-) Ralf This is what the AIX runtime linker outputs: # /usr/local/dovecot-1.2.dev/sbin/dovecot \ --exec-mail ext \ /usr/local/dovecot-1.2.dev/libexec/dovecot/expire-tool \ --test Info: Loading modules from directory: /usr/local/dovecot-1.2.dev/lib/dovecot/imap Info: Module loaded: /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib10_quota_plugin.so Error: dlopen(/usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so) failed: rtld: 0712-001 Symbol client_read_args was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol client_send_command_error was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol client_send_tagline was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol command_register was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol capability_string was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol command_unregister was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol client_send_line was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. Additional errors occurred but are not reported. Fatal: Couldn't load required plugins Robert Schetterer schrieb am 08.07.2009 11:13: Hi, sorry if this asked twice, i ve searched the list and found some equal posts, but couldnt get my problem fixed with it if running cronjob with expire ( using mysql ) i get dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Error: dlopen(/usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so) failed: /usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so: undefined symbol: capability_string Fatal: Couldn't load required plugins someone tips how to fix it ? perhaps problems relate to mail_location settings? dovecot --version 1.2.rc8 Hm, I ve read http://dovecot.org/pipermail/dovecot/2009-June/040126.html and used this script ( only problem to original was case sensitve mail_plugins) #!/bin/bash MAIL_PLUGINS=${mail_plugins//imap_quota/} /usr/lib/dovecot/expire-tool $1 now it runs dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/sbin/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: rob...@schetterer.com/Trash: stop, expire time in future: Wed Jul 15 10:34:39 2009 but i still have to test if there is a real delete now that i run the cronjob it stops before deleting cause of hanging with virtual namespace it should be possible to ignore ( not honor ) this with the script but for now i hung with how to, can somebody help ? dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/sbin/expire-tool.sh Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: auth input: home=maildir:/usr/local/virtual/schetterer.com/rob...@schetterer.com/ Info: auth input: quota_rule=*:bytes=1024 Info: auth input: quota_rule2=Trash:storage=50240 Info: auth input: quota_rule3=Sent:storage=50240 Info: auth input: quota_rule4=Drafts:storage=50240 Info: auth input: quota_rule5=Templates:storage=50240 Info: auth input: quota_rule6=Junk:storage=50240 Info: auth input: mail=maildir:/usr/local/virtual/schetterer.com/rob...@schetterer.com/ Info: auth input: namespace_1_inbox=yes Info: auth input: uid=1001 Info: auth input: gid=1001 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir:
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
Timo Sirainen wrote: What does your namespace configuration look like? Does Dovecot log anything related to expire plugin? I have switched to Dovecot 1.2.1 today: # 1.2.1: /usr/local/dovecot-1.2/etc/dovecot.conf # OS: Linux 2.6.30-gentoo-r2 i686 Gentoo Base System release 2.0.1 protocols: imap login_dir: /usr/local/dovecot-1.2/var/run/dovecot/login login_executable: /usr/local/dovecot-1.2/libexec/dovecot/imap-login mail_location: maildir:~/.maildir mail_debug: yes mail_plugins: expire auth default: mechanisms: plain login passdb: driver: ldap args: /usr/local/dovecot-1.2/etc/dovecot-ldap.conf userdb: driver: passwd socket: type: listen master: path: /usr/local/dovecot-1.2/var/run/dovecot/auth-master mode: 384 plugin: expire: Trash 1 Trash/* 1 Admin/Foo 3 */Admin/Foo 3 News/Bar 3 */News/Bar 3 */Foo 3 */Bar 3 expire_dict: proxy::expire sieve: /usr/local/dovecot-1.2/etc/sieve/%u.sieve dict: expire: mysql:/usr/local/dovecot-1.2/etc/dovecot-dict-expire.conf The log still does not give me much of a clue. It shows repetitions of No expiring in mailbox: Admin.Foo No expiring in mailbox: News.Bar so I think that the slashes in Admin/Foo and News/Bar etc. are not interpreted correctly. I tried replacing '/' with '.', but it did me no good. -R
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
On Fri, 2009-07-10 at 19:27 +0200, Ralph Seichter wrote: mail_location: maildir:~/.maildir You have no namespaces configured and you're using maildir.. expire: Trash 1 Trash/* 1 Admin/Foo 3 */Admin/Foo 3 News/Bar 3 */News/Bar 3 */Foo 3 */Bar 3 .. The log still does not give me much of a clue. It shows repetitions of No expiring in mailbox: Admin.Foo No expiring in mailbox: News.Bar Right. so I think that the slashes in Admin/Foo and News/Bar etc. are not interpreted correctly. Right, because the separator is '.', not '/' unless you've overridden it in namespace configuration. I tried replacing '/' with '.', but it did me no good. What does it log then? signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
Timo Sirainen wrote: I tried replacing '/' with '.', but it did me no good. What does it log then? No expiring in mailbox: Admin.Foo, just like before the modification. I don't understand this, because not using namespaces should mean literal string interpretation (or so I thought). -R
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
On Fri, 2009-07-10 at 19:40 +0200, Ralph Seichter wrote: Timo Sirainen wrote: I tried replacing '/' with '.', but it did me no good. What does it log then? No expiring in mailbox: Admin.Foo, just like before the modification. I don't understand this, because not using namespaces should mean literal string interpretation (or so I thought). Weird. Can you try what it logs with this patch? http://hg.dovecot.org/dovecot-1.2/rev/bdd8cb7f341a signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
Timo Sirainen wrote: No expiring in mailbox: Admin.Foo, just like before the modification. I don't understand this, because not using namespaces should mean literal string interpretation (or so I thought). Weird. Can you try what it logs with this patch? http://hg.dovecot.org/dovecot-1.2/rev/bdd8cb7f341a I started from scratch: Unpacked the original 1.2.1 sources, applied your patch, compiled, installed to a blank directory, wiped the MySQL database table containing expire timestamps. I then copied my existing configuration files to the new Dovecot instance, changed every '/' to '.' in the expire = ... line, and now the expire plugin works as expected! This baffles me significantly, because your patch only adds some logging output and I have already tried using '.' before reporting back to you in the first place. I appreciate that it is working now, but it is a weird behaviour nonetheless... (*scratches head*) ?!? -R
Re: [Dovecot] expire plugin with 1.2 cronjob undefined symbol: capability_string
dovecot@dovecot.org schrieb: Hi, this looks like one of my queued problems: On AIX I get a message that indicates missing global symbols. For example client_read_args. It is defined in src/imap/client.c but just linked at build time to the imap executable, while the expire-tool does not provide this function. Does expire-tool require the plugins quota and quota_imap at all? Is it the same issue or just another AIX specific problem I've to fix? :-) Ralf This is what the AIX runtime linker outputs: # /usr/local/dovecot-1.2.dev/sbin/dovecot \ --exec-mail ext \ /usr/local/dovecot-1.2.dev/libexec/dovecot/expire-tool \ --test Info: Loading modules from directory: /usr/local/dovecot-1.2.dev/lib/dovecot/imap Info: Module loaded: /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib10_quota_plugin.so Error: dlopen(/usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so) failed: rtld: 0712-001 Symbol client_read_args was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol client_send_command_error was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol client_send_tagline was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol command_register was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol capability_string was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol command_unregister was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol client_send_line was referenced from module /usr/local/dovecot-1.2.dev/lib/dovecot/imap/lib11_imap_quota_plugin.so(), but a runtime definition of the symbol was not found. Additional errors occurred but are not reported. Fatal: Couldn't load required plugins Robert Schetterer schrieb am 08.07.2009 11:13: Hi, sorry if this asked twice, i ve searched the list and found some equal posts, but couldnt get my problem fixed with it if running cronjob with expire ( using mysql ) i get dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Error: dlopen(/usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so) failed: /usr/lib/dovecot/modules/imap/lib02_imap_acl_plugin.so: undefined symbol: capability_string Fatal: Couldn't load required plugins someone tips how to fix it ? perhaps problems relate to mail_location settings? dovecot --version 1.2.rc8 Hm, I ve read http://dovecot.org/pipermail/dovecot/2009-June/040126.html and used this script ( only problem to original was case sensitve mail_plugins) #!/bin/bash MAIL_PLUGINS=${mail_plugins//imap_quota/} /usr/lib/dovecot/expire-tool $1 now it runs dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/sbin/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: rob...@schetterer.com/Trash: stop, expire time in future: Wed Jul 15 10:34:39 2009 but i still have to test if there is a real delete -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin with 1.2 cronjob undefined symbol: capability_string
Thanks, that's it! I've added it to the dovecot wiki: http://wiki.dovecot.org/Plugins/Expire By the way: You are using: #!/bin/bash MAIL_PLUGINS=${mail_plugins//imap_quota/} /usr/lib/dovecot/expire-tool $1 While mail_plugins in not defined and therefore empty it's the same like: #!/bin/bash MAIL_PLUGINS= /usr/lib/dovecot/expire-tool $1 so you are not removing just imap_quota but your are removing _all_ plugins. Just for correctness :-) Ralf Robert Schetterer schrieb am 08.07.2009 11:57: Hm, I ve read http://dovecot.org/pipermail/dovecot/2009-June/040126.html and used this script ( only problem to original was case sensitve mail_plugins) #!/bin/bash MAIL_PLUGINS=${mail_plugins//imap_quota/} /usr/lib/dovecot/expire-tool $1 now it runs dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/sbin/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: rob...@schetterer.com/Trash: stop, expire time in future: Wed Jul 15 10:34:39 2009 but i still have to test if there is a real delete -- __ Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier Mail: beck...@fh-trier.deFon: +49 651 8103 499 Web: http://www.fh-trier.de/~beckerrFax: +49 651 8103 214 PubKey: http://www.fh-trier.de/~beckerr Crypto: GnuPG, S/MIME __ Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit /amen. (Tom Listen) smime.p7s Description: S/MIME Cryptographic Signature
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
On Mon, 2009-06-22 at 14:48 +0200, Ralph Seichter wrote: expire = Trash 1 Trash/* 1 Admin/Foo 3 */Admin/Foo 3 News/Bar 3 */News/Bar 3 */Foo 3 */Bar 3 What does your namespace configuration look like? Does Dovecot log anything related to expire plugin? signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
On Tue, 2009-07-07 at 23:21 -0400, Timo Sirainen wrote: On Mon, 2009-06-22 at 14:48 +0200, Ralph Seichter wrote: expire = Trash 1 Trash/* 1 Admin/Foo 3 */Admin/Foo 3 News/Bar 3 */News/Bar 3 */Foo 3 */Bar 3 What does your namespace configuration look like? Does Dovecot log anything related to expire plugin? Also v1.2 + http://hg.dovecot.org/dovecot-1.2/rev/df2d4e398c06 could help show more. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
Timo Sirainen wrote: The only thing it needs is a trigger similar to PostgreSQL has in http://wiki.dovecot.org/Plugins/Expire. Well, at least SQLite knows CREATE TRIGGER, which might be a good omen. ;-) Speaking of DB backends for the expire plugin, I experimented with MySQL in combination with Dovecot 1.1.16 as long as BerkeleyDB remains uncooperative. This is the mailbox layout: john john/Admin/Foo john/Trash sue sue/News/Bar sue/Trash I'm using the sieve plugin to divert some incoming mail to john/Admin/Foo or sue/News/Bar respectively, but the 'expires' table in MySQL never shows entries for these two mailboxes. Moving mail manually to these two mailboxes (using Thunderbird) also fails to generate entries in 'expires'. So far, there are only two lines in the 'expires' table: john/Trash sue/Trash These were created after I deleted messages using Thunderbird. Have I misconfigured something? My dovecot.conf contains the following data: protocol imap { mail_plugins = expire } protocol lda { mail_plugins = cmusieve expire } dict { expire = mysql:/etc/dovecot/dovecot-dict-expire.conf } plugin { expire = Trash 1 Trash/* 1 Admin/Foo 3 */Admin/Foo 3 News/Bar 3 */News/Bar 3 */Foo 3 */Bar 3 expire_dict = proxy::expire sieve = /etc/dovecot/sieve/%u.sieve } As you can see, I tried various patterns to refer to folders Foo and Bar, but it does not seem to work. Trash appears to be OK, though. BTW, these are the contents of /etc/dovecot/dovecot-dict-expire.conf: connect = host=localhost dbname=db user=dbuser password=dbpass table = expires select_field = expire_stamp where_field = mailbox username_field = not_used Could you please give me a hint? I am willing to stick with MySQL for the time being, but I have to get it working first. ;-) -R
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with expire time in future errors?)
On Tue, 2009-06-16 at 20:42 +0200, Ralph Seichter wrote: Timo Sirainen wrote: I'm beginning to think it was a mistake to ever put Berkeley DB code to Dovecot. SQLite would work just as well (and without problems), right? You're probably right. Want to bite the bullet? The only thing it needs is a trigger similar to PostgreSQL has in http://wiki.dovecot.org/Plugins/Expire. signature.asc Description: This is a digitally signed message part