[Dovecot] 1.2.beta1: expire-tool and 'mail_location' setting

e-frog e-frog at gmx.de
Mon May 18 22:23:46 EEST 2009


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 at 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 at 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


More information about the dovecot mailing list