[Dovecot] Dovecot 2.0 beta4 and Expire Plugin
Burckhard Schmidt
bschmidt at cms.hu-berlin.de
Thu Apr 8 14:50:54 EEST 2010
Hello,
there seems to be an error writing into the expire database defined by dict.
dict {
expire = sqlite:/usr/dovecot/etc/dovecotbeta-dict-expire.conf
}
...
plugin {
...
expire = AutoCleanSpam 1d
expire_dict = proxy::expire
}
with dovecotbeta-dict-expire.conf:
connect = /test/addons/expire/expiresbeta.db
map {
pattern = shared/expire/$user/$mailbox
table = expires
value_field = expire_stamp
fields {
username = $user
mailbox = $mailbox
}
}
sqlite shows schema:
CREATE TABLE expires (
username varchar(100) not null,
mailbox varchar(255) not null,
expire_stamp integer not null,
primary key (username, mailbox)
);
CREATE TRIGGER mergeexpires BEFORE INSERT ON expires FOR EACH ROW
BEGIN
UPDATE expires SET expire_stamp=NEW.expire_stamp
WHERE username = NEW.username AND mailbox = NEW.mailbox;
SELECT raise(ignore)
WHERE (SELECT 1 FROM expires WHERE username =
NEW.username AND mailbox = NEW.mailbox) IS NOT NULL;
END;
Delivering of an email into folder AutoCleanSpam via sieve script works
fine.
error-log:
Apr 08 12:57:05 lda(account1): Debug: sieve: executing compiled script
/addons/sieve/account1.sieve
Apr 08 12:57:05 lda(account1): Debug: expire: Mails expire in 86400 secs
in mailbox: AutoCleanSpam
Apr 08 12:57:05 dict: Error: sqlite: exec(INSERT INTO expires
(expire_stamp,username,mailbox) VALUES
('1270810625','account1','AutoCleanSpam')) failed: unable to open
database file (14)
Apr 08 12:57:05 master: Error: service(dict): child 10936 killed with
signal 11 (core not dumped - set drop_priv_before_exec=yes)
Apr 08 12:57:05 master: Error: service(dict): command startup failed,
throttling
deliver-log:
Apr 08 12:57:05 lda(account1): Error: read(/var/run/dovecot//dict)
failed: Remote disconnected
Apr 08 12:57:05 lda(account1): Info: sieve:
msgid=<4BBDB681.10003 at hu-berlin.de>: stored mail into mailbox
'AutoCleanSpam'
If I use a non existing database filename in
dovecotbeta-dict-expire.conf like
connect = /test/addons/expire/expiresbeta.dbbbbb
I see in the log
dict: Error: sqlite: open(/test/addons/expire/expiresbeta.dbbbbb)
failed: unable to open database file
So I'm sure, having the rigth config file.
Moreover how to start expire-tool now?
dovecot --exec-mail ... is no more valid.
Additional:
/usr/dovecotbeta/sbin/dovecot --build-options
Build options: ioloop=poll ipv6 openssl
Mail storages: cydir dbox maildir mbox mdbox raw shared
SQL drivers: sqlite
Passdb: checkpassword ldap pam passwd passwd-file shadow sql
Userdb: checkpassword ldap passwd prefetch passwd-file sql static
/usr/dovecotbeta/sbin/dovecot -n
# 2.0.beta4: /usr/dovecotbeta/etc/dovecot/dovecot.conf
# OS: SunOS 5.9 sun4u
auth_debug = yes
auth_username_chars =
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345
67890
auth_verbose = yes
base_dir = /var/run/dovecot/
debug_log_path = /var/log/dovecot-error
default_client_limit = 6144
dict {
expire = sqlite:/usr/dovecot/etc/dovecotbeta-dict-expire.conf
}
first_valid_gid = 20
first_valid_uid = 20
info_log_path = /var/log/dovecot-error
listen = 172.19.5.17
log_path = /var/log/dovecot-error
mail_access_groups = sysdov
mail_debug = yes
mail_gid = sysdov
mail_location = dbox:%h:INDEX=/addons/index/%u:CONTROL=~/Control:LAYOUT=fs
mail_privileged_group = sysdov
mail_uid = sysdov
mbox_write_locks = fcntl
passdb {
args = dovecot
driver = pam
}
plugin {
autocreate = AutoCleanSpam
autocreate1 = Junk
autocreate2 = Trash
autocreate3 = Sent
autocreate4 = Drafts
autosubscribe = AutoCleanSpam
autosubscribe1 = Junk
autosubscribe2 = Trash
autosubscribe3 = Sent
autosubscribe4 = Drafts
expire = AutoCleanSpam 1d
expire_dict = proxy::expire
sieve = /addons/sieve/%u.sieve
}
service pop3 {
process_limit = 0
}
ssl_cert = </opt/csw/etc/ssl/certs/mail.pem
ssl_key = </opt/csw/ssl/priv/mail.key
syslog_facility = local2
userdb {
args = /usr/dovecot/etc/sybldap.conf
driver = ldap
}
verbose_proctitle = yes
protocol imap {
log_path = /var/log/imap.log
mail_plugin_dir = /usr/dovecotbeta/lib/dovecot
mail_plugins = autocreate expire
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
info_log_path = /var/log/deliver.log
log_path = /var/log/deliver.log
mail_plugin_dir = /usr/dovecotbeta/lib/dovecot
mail_plugins = sieve autocreate expire
postmaster_address = postmaster at hu-berlin.de
sendmail_path = /opt/csw/sbin/sendmail
}
--
Burckhard Schmidt
More information about the dovecot
mailing list