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 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: > > 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: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: > 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 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?)
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?)
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
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with "expire time in future" errors?)
Timo Sirainen schrieb: > On Thu, 2009-06-04 at 22:02 +0200, Ralph Seichter wrote: > >> Sorry for replying so late, the server running Dovecot succumbed to a >> hardware problem. Now that the machine is online again, I applied your >> patch. Running the expire tool now causes the following log messages: >> >> dict: db(secondary, ): DB->set_cachesize: method not permitted when >> environment specified >> dict: db(secondary, ): unable to allocate space from the buffer cache >> dict: sdb.open() failed: Cannot allocate memory >> > > 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? > > my 2 cent: Berkeley DB is one of the main reasons why we started to look at (great) alternatives like dovecot instead of cyrus. It's really a pain in the with Berkeley. Ask the OpenLDAP guys about the bdb backends and system crashes. Why bother with all the DB_CONFIG and checkpoint and whatever settings, when you can have all comfort of SQL with great speed, simpleness and self recovery of SQLite. The point of self recovery is one of the most great advantages of dovecot, really. BDB is acting opposite to it... :) And is it a lot easier to get some data out in case of investigations, debugging, backup, etc. Regards, Sebastian
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with "expire time in future" errors?)
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? -R
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with "expire time in future" errors?)
On Thu, 2009-06-04 at 22:02 +0200, Ralph Seichter wrote: > Sorry for replying so late, the server running Dovecot succumbed to a > hardware problem. Now that the machine is online again, I applied your > patch. Running the expire tool now causes the following log messages: > > dict: db(secondary, ): DB->set_cachesize: method not permitted when > environment specified > dict: db(secondary, ): unable to allocate space from the buffer cache > dict: sdb.open() failed: Cannot allocate memory 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? 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: > Does the attached patch help? If not, increase the 1024*1024 to a larger > value. Sorry for replying so late, the server running Dovecot succumbed to a hardware problem. Now that the machine is online again, I applied your patch. Running the expire tool now causes the following log messages: dict: db(secondary, ): DB->set_cachesize: method not permitted when environment specified dict: db(secondary, ): unable to allocate space from the buffer cache dict: sdb.open() failed: Cannot allocate memory dict: dict: db(/var/lib/dovecot/expire.db) open failed dict: Failed to initialize dictionary 'expire' This does not look too well yet. ;-) -R
Re: [Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with "expire time in future" errors?)
On Fri, 2009-05-29 at 17:26 +0200, Ralph Seichter wrote: > Timo Sirainen wrote: > > > Anyway it's not an error. It just means that all the rest of the > > mailboxes have future timestamps, and expire-tool has finished its work. > > I upgraded to Dovecot 1.1.15, but expire still gives me trouble. I keep > seeing the following error repeatedly now: > > dict: db(secondary, ): unable to allocate space from the buffer cache > dict: sdb.open() failed: Cannot allocate memory Does the attached patch help? If not, increase the 1024*1024 to a larger value. diff -r 6e42cd6ae8a7 src/lib-dict/dict-db.c --- a/src/lib-dict/dict-db.c Thu May 28 14:42:21 2009 -0400 +++ b/src/lib-dict/dict-db.c Sun May 31 19:20:39 2009 -0400 @@ -108,6 +108,7 @@ dict->sdb->set_errfile(dict->sdb, stderr); dict->sdb->set_errpfx(dict->sdb, p_strdup_printf(dict->pool, "db(secondary, %s)", username)); + dict->sdb->set_cachesize(dict->sdb, 0, 1024*1024, 1); if ((ret = dict->pdb->open(dict->pdb, dict->tid, uri, NULL, DB_BTREE, DB_CREATE, 0)) != 0) { signature.asc Description: This is a digitally signed message part
[Dovecot] Expire-Plugin segmentation fault (Re: Can expire-tool skip folders with "expire time in future" errors?)
Timo Sirainen wrote: > Anyway it's not an error. It just means that all the rest of the > mailboxes have future timestamps, and expire-tool has finished its work. I upgraded to Dovecot 1.1.15, but expire still gives me trouble. I keep seeing the following error repeatedly now: dict: db(secondary, ): unable to allocate space from the buffer cache dict: sdb.open() failed: Cannot allocate memory dict: dict: db(/var/lib/dovecot/expire.db) open failed dict: Failed to initialize dictionary 'expire' When I run the expire-tool manually or by cron job, it dies with a segmentation fault, so effectively I currently cannot use expire at all. -R