[Dovecot] 1.2.beta1: expire-tool and 'mail_location' setting
Hi Timo,
Trying 1.2.beta1 with expire plugin currently: When I set mail_location = maildir:~/.maildir the expire plugin doesn't delete messages.
#: expire-tool --test Info: auth input: system_user=foo Info: auth input: uid=1000 Info: auth input: gid=1000 Info: auth input: home=/home/foo Info: foo/Trash: no messages left
I also noticed that above command creates a new but empty directory 'mail' in user's home dir.
However using mail_location = maildir:~/Maildir and of course moving the messages to it works.
#: expire-tool --test Info: auth input: system_user=foo Info: auth input: uid=1000 Info: auth input: gid=1000 Info: auth input: home=/home/foo Info: foo/Trash: seq=1 uid=4078: Expunge . . Info: foo/Trash: seq=100 uid=4178: Expunge Info: foo/Trash: seq=101 uid=4179: Expunge Info: foo/Trash: timestamp 1235292536 -> 1235325429
My guess is that mail_location is not respected by expire-tool for some reason and in second case mailbox auto-detection makes it working?
Thanks, e-frog
#: dovecot -n # 1.2.beta1: /etc/dovecot/dovecot.conf # OS: Linux 2.6.27-11-server i686 Ubuntu 8.10 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap 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(managesieve): /usr/lib/dovecot/managesieve-login mail_privileged_group: mail mail_location: maildir:~/.maildir mail_debug: yes mail_drop_priv_before_exec: yes mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota imap_quota expire fts fts_squat mail_plugins(imap): quota imap_quota expire fts fts_squat mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve auth default: passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 user: dovecot group: Debian-exim master: path: /var/run/dovecot/auth-master mode: 384 plugin: quota: maildir quota_rule: *:storage=1GB quota_rule2: Trash:storage=10%% expire: Trash 1 expire_dict: proxy::expiredict sieve: ~/.dovecot.sieve sieve_dir: ~/.sieve fts: squat fts_squat: partial=4 full=10 dict: expiredict: mysql:/etc/dovecot/dovecot-dict-sql.conf
On Sun, 2009-02-22 at 12:49 +0100, e-frog wrote:
Trying 1.2.beta1 with expire plugin currently: When I set mail_location = maildir:~/.maildir the expire plugin doesn't delete messages.
Should be fixed in hg now.
My guess is that mail_location is not respected by expire-tool for some reason and in second case mailbox auto-detection makes it working?
Yes.
Timo Sirainen wrote:
On Sun, 2009-02-22 at 12:49 +0100, e-frog wrote:
Trying 1.2.beta1 with expire plugin currently: When I set mail_location = maildir:~/.maildir the expire plugin doesn't delete messages.
Should be fixed in hg now.
My guess is that mail_location is not respected by expire-tool for some reason and in second case mailbox auto-detection makes it working?
Yes.
Thanks Timo! It works now as long as there is no namespace for the virtual plugin defined:
foo@test:/etc/dovecot$ sudo /usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool --test Info: auth input: system_groups_user=foo Info: auth input: uid=1000 Info: auth input: gid=1000 Info: auth input: home=/home/foo Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/.maildir Info: maildir++: root=/home/foo/.maildir, index=, control=, inbox=/home/foo/.maildir Info: foo/Trash: seq=1 uid=1: Expunge Info: foo/Trash: seq=2 uid=2: Expunge
--snip --
Info: foo/Trash: seq=18 uid=18: Expunge Info: foo/Trash: seq=19 uid=19: Expunge Info: foo/Trash: timestamp 1242499040 -> 1242759162
Having the virtual namespace I see the following (dovecot -n below):
foo@test:/etc/dovecot$ sudo /usr/sbin/dovecot --exec-mail ext /usr/lib/dovecot/expire-tool --test Info: auth input: system_groups_user=foo Info: auth input: uid=1000 Info: auth input: gid=1000 Info: auth input: home=/home/foo Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/.maildir Info: maildir++: root=/home/foo/.maildir, index=, control=, inbox=/home/foo/.maildir Info: Namespace: type=private, prefix=virtual/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no Error: Namespace 'virtual/': Unknown mail storage driver virtual Info: User lookup failed: foo
# 1.2.rc4: /etc/dovecot/dovecot.conf # OS: Linux 2.6.27-14-server i686 Ubuntu 8.10 protocols: imap imaps 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(managesieve): /usr/lib/dovecot/managesieve-login verbose_proctitle: yes mail_location: maildir:~/.maildir mail_debug: yes mail_drop_priv_before_exec: yes mail_executable(default): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): expire virtual mail_plugins(imap): expire virtual mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve namespace: type: private separator: / inbox: yes list: yes subscriptions: yes namespace: type: private separator: / prefix: virtual/ location: virtual:~/.maildir/virtual list: children auth default: passdb: driver: pam userdb: driver: passwd 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 plugin: expire: Trash 1 expire_dict: proxy::expire sieve: ~/.dovecot.sieve sieve_dir: ~/sieve dict: expire: mysql:/etc/dovecot/dovecot-dict-sql.conf
On Mon, 2009-05-18 at 21:23 +0200, e-frog wrote:
Timo Sirainen wrote:
On Sun, 2009-02-22 at 12:49 +0100, e-frog wrote:
Trying 1.2.beta1 with expire plugin currently: When I set mail_location = maildir:~/.maildir the expire plugin doesn't delete messages.
Should be fixed in hg now.
My guess is that mail_location is not respected by expire-tool for some reason and in second case mailbox auto-detection makes it working?
Yes.
Thanks Timo! It works now as long as there is no namespace for the virtual plugin defined:
http://hg.dovecot.org/dovecot-1.2/rev/6fd725b94504 http://hg.dovecot.org/dovecot-1.2/rev/531083e6e84a
Then put mail_plugins setting outside protocol {}.
Timo Sirainen wrote:
On Mon, 2009-05-18 at 21:23 +0200, e-frog wrote:
Timo Sirainen wrote:
On Sun, 2009-02-22 at 12:49 +0100, e-frog wrote:
Trying 1.2.beta1 with expire plugin currently: When I set mail_location = maildir:~/.maildir the expire plugin doesn't delete messages. Should be fixed in hg now.
My guess is that mail_location is not respected by expire-tool for some reason and in second case mailbox auto-detection makes it working? Yes.
Thanks Timo! It works now as long as there is no namespace for the virtual plugin defined:
http://hg.dovecot.org/dovecot-1.2/rev/6fd725b94504 http://hg.dovecot.org/dovecot-1.2/rev/531083e6e84a
The above doesn't seem to fix it completely. However after adding module_dir_init(modules) it works: --- expire-tool.c.old 2009-06-01 17:14:54.000000000 +0200 +++ expire-tool.c 2009-06-01 17:16:50.000000000 +0200 @@ -263,6 +263,8 @@ static void expire_run(bool testrun) mail_storage_init(); mail_storage_register_all(); mailbox_list_register_all(); + + module_dir_init(modules); expire_get_global_mail_ids();
Then put mail_plugins setting outside protocol {}.
It looks like the mail_plugins setting outside protocol has no effect. Checking the environment of expire-tool as following /usr/sbin/dovecot --exec-mail ext /opt/bin/expire-tool.sh expire-tool.sh: #!/bin/sh set > /tmp/dovecot-environment /usr/lib/dovecot/expire-tool $1 dovecot-environment: ... MAIL_PLUGINS='virtual expire' MAIL_PLUGIN_DIR='/usr/lib/dovecot/modules/imap' ... These are the settings from the protocol imap section. In addition I noticed that dovecot -n also shows the same settings as for protocol imap for mail_plugins(default). However dovecot.conf definitely contains mail_plugins = virtual outside the protocol sections. I would have expected to see mail_plugins(default): virtual then. mail_plugins(default): virtual expire mail_plugins(imap): virtual expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
On Mon, 2009-06-01 at 17:43 +0200, e-frog wrote:
Thanks Timo! It works now as long as there is no namespace for the virtual plugin defined:
http://hg.dovecot.org/dovecot-1.2/rev/6fd725b94504 http://hg.dovecot.org/dovecot-1.2/rev/531083e6e84a
The above doesn't seem to fix it completely. However after adding module_dir_init(modules) it works:
OK, added.
Then put mail_plugins setting outside protocol {}.
It looks like the mail_plugins setting outside protocol has no effect. .. These are the settings from the protocol imap section.
Oh, right. That's because of how it's implemented in v1.2. Kind of ugly, but I don't know if I'll bother fixing it until it becomes a real problem for someone. :) v2.0 implements this properly.
Timo Sirainen schrieb:
On Mon, 2009-06-01 at 17:43 +0200, e-frog wrote:
Thanks Timo! It works now as long as there is no namespace for the virtual plugin defined: http://hg.dovecot.org/dovecot-1.2/rev/6fd725b94504 http://hg.dovecot.org/dovecot-1.2/rev/531083e6e84a The above doesn't seem to fix it completely. However after adding module_dir_init(modules) it works:
OK, added.
Then put mail_plugins setting outside protocol {}.
It looks like the mail_plugins setting outside protocol has no effect. .. These are the settings from the protocol imap section.
Oh, right. That's because of how it's implemented in v1.2. Kind of ugly, but I don't know if I'll bother fixing it until it becomes a real problem for someone. :) v2.0 implements this properly.
Sure, the current implementation works for me. Thanks again Timo!
Then put mail_plugins setting outside protocol {}.
It looks like the mail_plugins setting outside protocol has no effect. .. These are the settings from the protocol imap section. Oh, right. That's because of how it's implemented in v1.2. Kind of ugly, but I don't know if I'll bother fixing it until it becomes a real problem for someone. :) v2.0 implements this properly.
Sure, the current implementation works for me. Thanks again Timo!
Spoke too soon ;-)
Adding imap_quota plugin to the mail_plugins for protocol imap breaks it:
$ sudo /usr/sbin/dovecot --exec-mail ext /opt/bin/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Error: dlopen(/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so) failed: /usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so: undefined symbol: capability_string Fatal: Couldn't load required plugins
On Tue, 2009-06-02 at 21:29 +0200, e-frog wrote:
Adding imap_quota plugin to the mail_plugins for protocol imap breaks it:
$ sudo /usr/sbin/dovecot --exec-mail ext /opt/bin/expire-tool.sh --test
Well, if you're using a script anyway, just modify MAIL_PLUGINS environment there. :)
-------- Original Message -------- Subject: Re: [Dovecot] 1.2.beta1: expire-tool and 'mail_location' setting From: Timo Sirainen tss@iki.fi To: e-frog e-frog@gmx.de Date: 02.06.2009 23:21
On Tue, 2009-06-02 at 21:29 +0200, e-frog wrote:
Adding imap_quota plugin to the mail_plugins for protocol imap breaks it:
$ sudo /usr/sbin/dovecot --exec-mail ext /opt/bin/expire-tool.sh --test
Well, if you're using a script anyway, just modify MAIL_PLUGINS environment there. :)
Well, I just used the script for debugging :) But OK why not using it always? The following deletes imap_quota from the MAIL_PLUGINS variable.
expire-tool.sh: #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} #set > /tmp/dovecot-environment /usr/lib/dovecot/expire-tool $1
participants (2)
-
e-frog
-
Timo Sirainen