[Dovecot] Bug Report in Connection with Expire Plugin

Jörg Leis joerg at joergleis.com
Fri Dec 26 12:10:43 EET 2008


If the expire plugin is enabled and a new message (not in trash) is 
deleted via IMAP in Mozilla Thunderbird (only tested in this client), it 
will indefinately copy the message into the folder. Dovecot, meanwhile, 
occupies itself with this:


root at server:~# cat /var/log/dovecot.log
[...]
dovecot: 2008-12-26 09:21% Error: child 6132 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6133 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6134 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6135 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6136 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6138 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6139 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6140 (imap) killed with signal 11
dovecot: 2008-12-26 09:21% Error: child 6142 (imap) killed with signal 11
[...]


root at server:~# cat /var/log/dovecot.info
[...]
dovecot: 2008-12-26 09:21% Info: imap-login: Login: 
user=<admin at bildig.ch>, method=CRAM-MD5, rip=84.75.159.19, 
lip=92.42.190.87, TLS
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Loading modules 
from directory: /usr/lib/dovecot/modules/imap
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Module loaded: 
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Module loaded: 
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Module loaded: 
/usr/lib/dovecot/modules/imap/lib20_expire_plugin.so
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Effective 
uid=5000, gid=5000, home=/home/vmail/Maildirs/bildig.ch/admin
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota root: 
name=User Quota backend=maildir args=
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota rule: 
root=User Quota mailbox=* bytes=524288000 (0%) messages=0 (0%)
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota rule: 
root=User Quota mailbox=Trash bytes=52428800 (0%) messages=0 (0%)
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota warning: 
bytes=498073600 (95%) messages=0 (0%) 
command=/usr/local/bin/mail-quota-warning.sh 95
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota warning: 
bytes=419430400 (80%) messages=0 (0%) 
command=/usr/local/bin/mail-quota-warning.sh 80
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): maildir: 
data=/home/vmail/Maildirs/bildig.ch/admin
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): maildir++: 
root=/home/vmail/Maildirs/bildig.ch/admin, index=, control=, 
inbox=/home/vmail/Maildirs/bildig.ch/admin
dovecot: 2008-12-26 09:21% Info: imap-login: Login: 
user=<admin at bildig.ch>, method=CRAM-MD5, rip=84.75.159.19, 
lip=92.42.190.87, TLS
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Loading modules 
from directory: /usr/lib/dovecot/modules/imap
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Module loaded: 
/usr/lib/dovecot/modules/imap/lib10_quota_plugin.so
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Module loaded: 
/usr/lib/dovecot/modules/imap/lib11_imap_quota_plugin.so
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Module loaded: 
/usr/lib/dovecot/modules/imap/lib20_expire_plugin.so
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Effective 
uid=5000, gid=5000, home=/home/vmail/Maildirs/bildig.ch/admin
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota root: 
name=User Quota backend=maildir args=
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota rule: 
root=User Quota mailbox=* bytes=524288000 (0%) messages=0 (0%)
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota rule: 
root=User Quota mailbox=Trash bytes=52428800 (0%) messages=0 (0%)
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota warning: 
bytes=498073600 (95%) messages=0 (0%) 
command=/usr/local/bin/mail-quota-warning.sh 95
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): Quota warning: 
bytes=419430400 (80%) messages=0 (0%) 
command=/usr/local/bin/mail-quota-warning.sh 80
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): maildir: 
data=/home/vmail/Maildirs/bildig.ch/admin
dovecot: 2008-12-26 09:21% Info: IMAP(admin at bildig.ch): maildir++: 
root=/home/vmail/Maildirs/bildig.ch/admin, index=, control=, 
inbox=/home/vmail/Maildirs/bildig.ch/admin
[...]


When the expire plugin is disabled no error occurs. I use Dovecot 1.1.4 
on Ubuntu 8.10 Intrepid with following settings:


root at server:~# dovecot -n
# 1.1.4: /etc/dovecot/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot.info
log_timestamp: %Y-%m-%d %H:%M%
protocols: imaps pop3s
ssl_cert_file: /etc/ssl/certs/www_bildig_ch__chained.crt
ssl_key_file: /etc/ssl/private/www_bildig_ch.key
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_greeting: Dovecot ready
login_process_per_connection: no
login_processes_count: 1
login_max_processes_count: 8
login_max_connections: 64
valid_chroot_dirs: /var/spool/vmail
mail_debug: yes
mail_location: maildir:/home/vmail/Maildirs/%d/%n
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_process_size: 64
mail_plugins(default): expire imap_quota quota
mail_plugins(imap): expire imap_quota quota
mail_plugins(pop3): expire quota
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
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %08%08Xv
auth default:
  mechanisms: cram-md5
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  userdb:
    driver: static
    args: uid=vmail gid=vmail home=/home/vmail/Maildirs/%d/%n 
allow_all_users=yes
  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:
  expire: Trash 30 Trash/* 30 Spam 30
  expire_dict: proxy::expire
  quota: maildir:User Quota
  quota_rule: *:storage=500M
  quota_rule2: Trash:storage=50M
  quota_warning: storage=95%% /usr/local/bin/mail-quota-warning.sh 95
  quota_warning2: storage=80%% /usr/local/bin/mail-quota-warning.sh 80
dict:
  expire: mysql:/etc/dovecot/dovecot-dict-expire.conf


root at server:~# cat /etc/dovecot/dovecot-sql.conf
driver = mysql
connect = host=127.0.0.1 dbname=mailserver user=mailserver password=testpwd1
default_pass_scheme = CRAM-MD5
password_query = SELECT email AS user, password, quota_rule FROM 
view_users WHERE email='%u'


root at server:~# cat /etc/dovecot/dovecot-dict-expire.conf
connect = host=localhost dbname=mailserver user=mailserver_exp 
password=testpwd2
table = expire
select_field = expire_stamp
where_field = mailbox


I tried using a "user_field = user" additionally as is written here: 
http://wiki.dovecot.org/Plugins/Expire. (Incidentally, there must be 
some mismatch in the documentation because the tables for v1.1 do not 
contain a field username). Of course I adapted the MySQL database 
accordingly.

Unfortunately I was unable to produce a backtrace.

Thanks,
Joerg Leis


More information about the dovecot mailing list