Dear Jens,
Mind didn't worked ever. Below is my dovecot config. Could you give me a hint on it.? Dovecot didn't update the dict_expire table whenever I remove a message or move a message into the Trash folder. Is there any different on the dovecot.conf between u and me ?
# dovecot-dict-expire.conf connect = host=xxxx dbname=xxxx user=xxxxpassword=xxxx table = dict_expire select_field = timestamp where_field = path username_field = username
# dovecot -n # 1.1.2: /usr/local/etc/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot.log protocols: imap pop3 listen: 192.168.18.20 ssl_disable: yes disable_plaintext_auth: no shutdown_clients: 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(pop3): /usr/local/libexec/dovecot/pop3-login login_greeting: Service Ready. login_greeting_capability(default): yes login_greeting_capability(imap): yes login_greeting_capability(pop3): no login_process_size: 32 login_processes_count: 10 login_max_processes_count: 256 max_mail_processes: 1024 verbose_proctitle: yes first_valid_uid: 26 last_valid_uid: 26 first_valid_gid: 26 last_valid_gid: 26 mail_access_groups: mail mail_location: maildir:~/Maildir mmap_disable: yes mail_nfs_storage: yes mail_nfs_index: yes maildir_stat_dirs: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): expire fts fts_squat quota imap_quota mail_plugins(imap): expire fts fts_squat quota imap_quota mail_plugins(pop3): expire quota mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 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(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: cache_size: 8192 cache_ttl: 900 verbose: yes worker_max_count: 10 passdb: driver: sql args: /usr/local/etc/dovecot-mysql.conf userdb: driver: sql args: /usr/local/etc/dovecot-mysql.conf socket: type: listen client: path: /var/run/dovecot/auth-client mode: 438 master: path: /var/run/dovecot/auth-master mode: 438 plugin: quota: maildir quota_rule: *:storage=2G quota_rule2: Trash:storage=10M expire: Trash 2 expire_dict: proxy::expiredict auth_socket_path: /var/run/dovecot/auth-master fts: squat fts_squat: partial=4 full=10 dict: expiredict: mysql:/usr/local/etc/dovecot-dict-expire.conf
Thanks, Dino
Jens Meyer wrote:
Hello Eric,
thank you for your further help.
Now I understand the concept of this plugin - great!
The record was created:
username path timestamp jens@test.jensmeyer.de/Trash 1218029872
AFAIK I have to add "Trash" instead of "INBOX.Trash" when seeing this record, correct?
Kind regards,
Jens
Eric Toczek schrieb:
Hello Eric,
thank you very much for your prompt and helpful reply!
The connect seem to work fine now.
Please allow me two additional questions: Is it correct that this database-table is only a "caching-table" which is empty at first and will be filled later? It is not necessary to adapt the SQL-statement to my user-configuration, is it?! Correct. The table is filled when the message is moved to one of the folders that is marked as an Expire folder. That folder is added to the
Jens Meyer wrote: table with a timestamp like so:
$ echo "select * from mail.expire where path like 'eric%'" | mysql -u root -p Enter password: username path timestamp eric@flerd.com/Junk 1217943338 eric@flerd.com/Trash 1217941084
Is it necessary to reference the foldernames with "INBOX.Trash" or only "Trash"? For Sieve I have to use "INBOX.Trash".
Use INBOX.Trash if the trash folder you're looking to clear out is a subfolder of your Inbox.
Actually nothing happens when trying the plugin with "dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool --test". Do you have the plugin loaded in the imap protocol section?
protocol imap { ... mail_plugins = fts fts_squat quota imap_quota expire ... }
If you do then the table should get updated when you move a message into the trash folder.
If you've got the plugin set correctly and you're still not getting anything written into the table you can restart mysql with query logging on: http://dev.mysql.com/doc/refman/5.0/en/query-log.html
Then move a message to one of the expire folders and see what query is run on the database and if it's not succeeding due to an error.