[Dovecot] expire tool - individual user/folder?
Hello,
is the expire plugin usable to delete mails with different settings for each individual user? If i view sample config at http://wiki.dovecot.org/Plugins/Expire it looks like expire-data are related to foldernames. Is it possible to let each user "activate" the expire-plugin for different folders with different settings?
Thanks, Andre
On Thu, 2009-04-23 at 08:52 +0200, Andre Hübner wrote:
is the expire plugin usable to delete mails with different settings for each individual user? If i view sample config at http://wiki.dovecot.org/Plugins/Expire it looks like expire-data are related to foldernames. Is it possible to let each user "activate" the expire-plugin for different folders with different settings?
The plugin yes, but expire-tool not really. It would be possible to have userdb lookups return an overridden expire setting and use it instead of the global one, but that would require writing more code..
Hello,
The plugin yes, but expire-tool not really. It would be possible to have userdb lookups return an overridden expire setting and use it instead of the global one, but that would require writing more code..
i have made 2 testsetups with expire-plugin (mysql,dbd) it seems to work, in table i can find new entry for expire_stamp But how i can make individual settings for different users? adding user/folder in dovecot.conf gets ignored. is the plan to add separat settings directly in the expire-dict? (adding lines in mysql-table?)
second question is much more importend. how to debug this if i get seg.faults when running "dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test" ? basically connect to mysql/dbd is working. if is expire-timestamp in future i get correct results. problem occurs when a folder is expired and action is required. how can i debug this to find real error? Common debugsettings in dovecot.conf seems not to work. i did compile with --enable-debug but all i got is:
# dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test Warning: Growing pool 'Expire pool' with: 1024 Segmentation Fault
Thanks, Andre
On Mon, 2009-05-25 at 14:38 +0200, Andre Hübner wrote:
Hello,
The plugin yes, but expire-tool not really. It would be possible to have userdb lookups return an overridden expire setting and use it instead of the global one, but that would require writing more code..
i have made 2 testsetups with expire-plugin (mysql,dbd) it seems to work, in table i can find new entry for expire_stamp But how i can make individual settings for different users? adding user/folder in dovecot.conf gets ignored.
You can override a setting by returning it from userdb. http://wiki.dovecot.org/UserDatabase/ExtraFields
second question is much more importend. how to debug this if i get seg.faults when running "dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test" ?
ulimit -c unlimited dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test gdb /usr/libexec/dovecot/expire-tool core bt full
But as I said, you can't get expire-tool to work properly with different settings. It will always use only the settings you have in dovecot.conf, messing up all the database for the non-default users.
Hello,
ulimit -c unlimited dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test gdb /usr/libexec/dovecot/expire-tool core bt full
here is the output. i am not in a hurry, for me it was just testing. But you are surely interested...
gdb /usr/libexec/dovecot/expire-tool core GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"...Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `expire-tool --test'. Program terminated with signal 11, Segmentation fault.
warning: Can't read pathname for load map: Eingabe-/Ausgabefehler. Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0xb7e5eeb3 in strlen () from /lib/libc.so.6 (gdb) bt full #0 0xb7e5eeb3 in strlen () from /lib/libc.so.6 No symbol table info available. #1 0x080ba380 in vstrconcat (str1=0x80bd017 "RESTRICT_SETGID=", args=0xbfd4bd78 "", ret_len=0xbfd4bd5c) at strfuncs.c:165 str = 0x4
temp = 0x80d6330 "RESTRICT_SETGID=", 'Þ'Thanks, Andre
On Tue, 2009-05-26 at 08:50 +0200, Andre Hübner wrote:
#1 0x080ba380 in vstrconcat (str1=0x80bd017 "RESTRICT_SETGID=", args=0xbfd4bd78 "", ret_len=0xbfd4bd5c) at strfuncs.c:165 str = 0x4
temp = 0x80d6330 "RESTRICT_SETGID=", 'Þ'... bufsize = 512 i = 16 len = 16 __PRETTY_FUNCTION__ = "vstrconcat" #2 0x080babe3 in t_strconcat (str1=0x80bd017 "RESTRICT_SETGID=") at strfuncs.c:265 args = 0xbfd4bd74 "\004" len = 28 #3 0x0804a949 in auth_input (conn=0x80da350) at auth-client.c:142 line = <value optimized out>
That really shouldn't be happening. What dovecot version is this with? Can you run it with valgrind?
valgrind --trace-children=yes dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test
That really shouldn't be happening. What dovecot version is this with? Can you run it with valgrind?
its version 1.1.15
valgrind --trace-children=yes dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test
==31981== Memcheck, a memory error detector. ==31981== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==31981== Using LibVEX rev 1575, a library for dynamic binary translation. ==31981== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==31981== Using valgrind-3.1.1, a dynamic binary instrumentation framework. ==31981== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==31981== For more details, rerun with: -v ==31981== ==31981== Memcheck, a memory error detector. ==31981== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==31981== Using LibVEX rev 1575, a library for dynamic binary translation. ==31981== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==31981== Using valgrind-3.1.1, a dynamic binary instrumentation framework. ==31981== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==31981== For more details, rerun with: -v ==31981== Warning: Growing pool 'Expire pool' with: 1024 ==31981== Invalid read of size 1 ==31981== at 0x4021FB8: strlen (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==31981== by 0x80BA37F: vstrconcat (strfuncs.c:165) ==31981== by 0x80BABE2: t_strconcat (strfuncs.c:265) ==31981== by 0x804A948: auth_input (auth-client.c:142) ==31981== by 0x80B1A16: io_loop_handler_run (ioloop-epoll.c:209) ==31981== by 0x80B0B07: io_loop_run (ioloop.c:336) ==31981== by 0x804A5E3: auth_client_put_user_env (auth-client.c:229) ==31981== by 0x804B5C6: main (expire-tool.c:43) ==31981== Address 0x4 is not stack'd, malloc'd or (recently) free'd ==31981== ==31981== Process terminating with default action of signal 11 (SIGSEGV) ==31981== Access not within mapped region at address 0x4 ==31981== at 0x4021FB8: strlen (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==31981== by 0x80BA37F: vstrconcat (strfuncs.c:165) ==31981== by 0x80BABE2: t_strconcat (strfuncs.c:265) ==31981== by 0x804A948: auth_input (auth-client.c:142) ==31981== by 0x80B1A16: io_loop_handler_run (ioloop-epoll.c:209) ==31981== by 0x80B0B07: io_loop_run (ioloop.c:336) ==31981== by 0x804A5E3: auth_client_put_user_env (auth-client.c:229) ==31981== by 0x804B5C6: main (expire-tool.c:43) ==31981== ==31981== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 1) ==31981== malloc/free: in use at exit: 34,477 bytes in 35 blocks. ==31981== malloc/free: 36 allocs, 1 frees, 34,637 bytes allocated. ==31981== For counts of detected errors, rerun with: -v ==31981== searching for pointers to 35 not-freed blocks. ==31981== checked 93,876 bytes. ==31981== ==31981== LEAK SUMMARY: ==31981== definitely lost: 0 bytes in 0 blocks. ==31981== possibly lost: 0 bytes in 0 blocks. ==31981== still reachable: 34,477 bytes in 35 blocks. ==31981== suppressed: 0 bytes in 0 blocks. ==31981== Reachable blocks (those to which a pointer was found) are not shown. ==31981== To see them, rerun with: --show-reachable=yes Segmentation Fault
Andre
On Tue, 2009-05-26 at 09:20 +0200, Andre Hübner wrote:
That really shouldn't be happening. What dovecot version is this with? Can you run it with valgrind?
its version 1.1.15
valgrind --trace-children=yes dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test .. Warning: Growing pool 'Expire pool' with: 1024 ==31981== Invalid read of size 1 ==31981== at 0x4021FB8: strlen (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==31981== by 0x80BA37F: vstrconcat (strfuncs.c:165) ==31981== by 0x80BABE2: t_strconcat (strfuncs.c:265) ==31981== by 0x804A948: auth_input (auth-client.c:142)
Does the problem go away if you don't configure Dovecot with --enable-devel-checks?
Does the problem go away if you don't configure Dovecot with --enable-devel-checks?
no, its not included in my configure-line. This is it:
./configure
--prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
--mandir=/usr/share/man
--with-ssl=openssl
--with-storages=mbox,maildir,raw
--with-pam
--with-passwd
--with-db
--enable-debug
i just added --enable-debug after having the segfaults whren running the expire-tool to see more lines... sorry for always making problems ;)
Andre
On Tue, 2009-05-26 at 09:35 +0200, Andre Hübner wrote:
Does the problem go away if you don't configure Dovecot with --enable-devel-checks?
no, its not included in my configure-line. This is it: .. --enable-debug
This is what I meant actually, the name just changed in v1.2.
What do you get with the attached patch?
On Tue, 2009-06-02 at 20:21 +0200, Andre Hübner wrote:
This is what I meant actually, the name just changed in v1.2.
What do you get with the attached patch?
patch fixes the problem in both cases. it does not care if --enable-debug is enabled or disabled.
The patch shouldn't really have changed anything.
in 1.1.16 it works without the patch.
And I didn't fix anything in 1.1.16 either. Maybe it was some weird compiling issue or something..
participants (2)
-
Andre Hübner
-
Timo Sirainen