Re: [Dovecot] Expire plugin does not work
On Thu, 2010-12-16 at 20:55 +0100, Christoph Pleger wrote: dovecot: dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1292525469','christoph','Trash')) failed: unable to open database file (14) So SQLite can't open its database. I don't know what 14 error would mean, maybe SQLite docs can tell you. connect = /etc/dovecot/dovecot-dict.sqlite Databases shouldn't really be put under /etc.. Rather maybe /var/lib/dovecot/ I have attached a dovecot -n-generated dovecot.conf, the configuration file for the expire dict service, and my sqlite3 database file. In my filesystem, dovecot-dict.sqlite currently has permissions 666. But if it's 0666, I'm not really sure what the problem could be. You could try if dict can access it as root: service dict { user = root }
Re: [Dovecot] Expire plugin does not work
Hello, But if it's 0666, I'm not really sure what the problem could be. You could try if dict can access it as root: service dict { user = root } I have found the solution: The directory where the sqlite3 database resides must be writable by the dovecot user. Regards Christoph
[Dovecot] Expire plugin does not work
Hello, I followed the instructions on http://wiki2.dovecot.org/Plugins/Expire to configure the expire plugin, but when I move a message to the Trash folder, I get the following error messages in my logfile: dovecot: dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1292525469','christoph','Trash')) failed: unable to open database file (14) dovecot: dict: Error: sql dict: commit failed: I have attached a dovecot -n-generated dovecot.conf, the configuration file for the expire dict service, and my sqlite3 database file. In my filesystem, dovecot-dict.sqlite currently has permissions 666. Regards Christoph # 2.0.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-bpo.5-amd64 x86_64 Debian 5.0.7 auth_mechanisms = plain login dict { expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no first_valid_uid = 122 last_valid_uid = 122 mail_gid = vmail mail_location = mdbox:~/mdbox mail_plugins = expire mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date passdb { args = scheme=PLAIN-MD5 username_format=%Ln /etc/dovecot/databases/users driver = passwd-file } plugin { antispam_backend = SPOOL2DIR antispam_spam = Spam antispam_spool2dir_notspam = %h/ham/%%020lu-%%05lu antispam_spool2dir_spam = %h/spam/%%020lu-%%05lu antispam_trash = Trash expire = Spam expire2 = Trash expire_dict = proxy::expire sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap lmtp sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service dict { unix_listener dict { group = vmail mode = 0660 user = vmail } } service imap-login { inet_listener imap { port = 0 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener lmtp { group = dspam mode = 0660 user = root } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 0 ssl = yes } } ssl_cert = /etc/ssl/certs/dovecot.pem ssl_key = /etc/ssl/private/dovecot.pem userdb { args = username_format=%Ln /etc/dovecot/databases/users driver = passwd-file } protocol lmtp { mail_plugins = expire sieve } protocol imap { imap_client_workarounds = delay-newmail mail_plugins = expire antispam } connect = /etc/dovecot/dovecot-dict.sqlite # CREATE TABLE quota ( # username varchar(100) not null, # bytes bigint not null default 0, # messages integer not null default 0, # primary key (username) # ); map { pattern = priv/quota/storage table = quota username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota username_field = username value_field = messages } # CREATE TABLE expires ( # username varchar(100) not null, # mailbox varchar(255) not null, # expire_stamp integer not null, # primary key (username, mailbox) # ); map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } dovecot-dict.sqlite Description: application/sqlite3
Re: [Dovecot] Expire plugin does not work
Hello, I forgot to mention the dovecot version number. It is version 2.0.7. Regards Christoph
Re: [Dovecot] Expire plugin does not work
On Wed, 04 Feb 2009 12:17:05 -0500 Timo Sirainen t...@iki.fi wrote: On Wed, 2009-02-04 at 11:27 +0100, Nicolas Letellier wrote: Info: us...@domain.tld/Trash: stop, expire time in future: Wed Feb 4 21:00:50 2009 Why this message? I have 3 mailboxes, and the message appears only with this mailbox. The 2 others mailbox have mails into Trash and Junk folders. And the mail are older than 2 days. An ls -lcs say it. Dovecot tracks the timestamp when the message was copied to Trash, not necessary its ctime. So you probably copied the message to Trash on Feb 3 21:00:50, which is why it'll get expunged at Feb 4 21:00:50. But, now, we are 6 feb, and I have these messages: -rw--- 1 dovecot dovecot 3822 Feb 2 11:11 1233569469.M275631P48216.helm.nicoelro.net,S=3822,W=3945:2,S -rw--- 1 dovecot dovecot 3004 Feb 2 15:40 1233585799.M730005P46882.helm.nicoelro.net,W=3078,S=3004:2,S -rw--- 1 dovecot dovecot 3056 Feb 2 16:16 1233587786.M676156P51401.helm.nicoelro.net,S=3056,W=3132:2,S Sincerlery, I don't understand! This night, I had: Info: mailb...@domain.fr/Trash: no messages left Info: mailb...@domain.net/Junk: no messages left Info: mailb...@domain.net/Junk: no messages left Info: mailb...@domain.net/Trash: stop, expire time in future: Fri Feb 6 19:43:55 2009 I can swear you I have new messages in Junk in mailbox1! After, I ran command without --test, it deleted nothing... I ran a command with --test and I had: Info: mailb...@domain.net/Trash: stop, expire time in future: Fri Feb 6 19:43:55 2009 The 3 other messages have been deleted. I don't know why. I don't know why expired mail was not deleted... In a mailbox1, I have this into Junk/cur directory: 4 -rw--- 1 dovecot dovecot 3822 Feb 2 13:39 1233569469.M275631P48216.***.***.net,S=3822,W=3945:2,S 4 -rw--- 1 dovecot dovecot 3004 Feb 2 15:43 1233585799.M730005P46882.***.***.net,W=3078,S=3004:2,S 4 -rw--- 1 dovecot dovecot 3056 Feb 2 17:49 1233587786.M676156P51401.***.***.net,S=3056,W=3132:2,S 4 -rw--- 1 dovecot dovecot 3732 Feb 2 17:49 1233592892.M701994P52459.***.***.net,S=3732,W=3823:2,S We are Feb 4, and these message are always here. No informations with mail_debug, or with --test parameter.These messages were arrived Feb 2, and they might have this date in dovecot.index.cache... Was expire plugin enabled then? If it wasn't, it didn't add them to its database so it doesn't know about them. Yes, expire plugin was enabled. I delete ALL my spams and ALL my Trash mails. And after, I activated the expire plugin. # 1.1.10: /usr/local/etc/dovecot.conf # OS: FreeBSD 6.3-RELEASE-p4 i386 ufs syslog_facility: local6 protocols: imap imaps managesieve ssl_cert_file: /etc/ssl/mail/mail.nicoelro.net.cert ssl_key_file: /etc/ssl/mail/mail.nicoelro.net.key disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login login_user: dovecot-auth login_greeting: NicoElro.Net Mail Server login_processes_count: 2 verbose_proctitle: yes first_valid_uid: 143 last_valid_uid: 143 first_valid_gid: 143 last_valid_gid: 143 mail_access_groups: mail mail_location: maildir:/var/mail/vmail/%u/ mail_debug(default): no mail_debug(imap): no mail_debug(managesieve): yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_log expire mail_plugins(imap): quota imap_quota mail_log expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(managesieve): sieve(default): sieve(imap): sieve(managesieve): ~/dovecot.sieve auth default: mechanisms: plain login master_user_separator: * passdb: driver: passwd-file args: /usr/local/etc/dovecot.masterusers master: yes passdb: driver: sql args: /usr/local/etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /usr/local/etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: dovecot group: mail plugin: quota: maildir quota_rule: *:storage=1000M quota_rule2: Trash:storage=50M quota_warning: storage=80%% /usr/home/scripts/mail_quota-warning.sh 80 quota_warning2: storage=90%%
Re: [Dovecot] Expire plugin does not work
On Wed, 2009-02-04 at 11:27 +0100, Nicolas Letellier wrote: Info: us...@domain.tld/Trash: stop, expire time in future: Wed Feb 4 21:00:50 2009 Why this message? I have 3 mailboxes, and the message appears only with this mailbox. The 2 others mailbox have mails into Trash and Junk folders. And the mail are older than 2 days. An ls -lcs say it. Dovecot tracks the timestamp when the message was copied to Trash, not necessary its ctime. So you probably copied the message to Trash on Feb 3 21:00:50, which is why it'll get expunged at Feb 4 21:00:50. In a mailbox1, I have this into Junk/cur directory: 4 -rw--- 1 dovecot dovecot 3822 Feb 2 13:39 1233569469.M275631P48216.***.***.net,S=3822,W=3945:2,S 4 -rw--- 1 dovecot dovecot 3004 Feb 2 15:43 1233585799.M730005P46882.***.***.net,W=3078,S=3004:2,S 4 -rw--- 1 dovecot dovecot 3056 Feb 2 17:49 1233587786.M676156P51401.***.***.net,S=3056,W=3132:2,S 4 -rw--- 1 dovecot dovecot 3732 Feb 2 17:49 1233592892.M701994P52459.***.***.net,S=3732,W=3823:2,S We are Feb 4, and these message are always here. No informations with mail_debug, or with --test parameter.These messages were arrived Feb 2, and they might have this date in dovecot.index.cache... Was expire plugin enabled then? If it wasn't, it didn't add them to its database so it doesn't know about them. signature.asc Description: This is a digitally signed message part