[Dovecot] expire plugin and sieve
Hi.
I am running dovecot 1.2.9 here, allowing users to filter their mails with the sieve plugin, and am using sieve to move mail tagged as probably spam into the spam folder.
I'm now looking to get the expire plugin working as well. It does work as described in the wiki: Once I manually move messages into other folders, the mysql database is filled with entries.
However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something?
# dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-27-server x86_64 Ubuntu 10.04.1 LTS fuse.glusterfs log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s managesieve ssl_cert_file: /etc/dovecot/imapd.pem ssl_key_file: /etc/dovecot/imapd.pem 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(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login login_user: postfix login_process_per_connection: no login_process_size: 128 first_valid_uid: 113 mail_privileged_group: mail mail_location: maildir:/home/vmail/%Ld/%Ln:INDEX=/var/indexes/%u mail_debug: yes mail_nfs_storage: yes mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): expire mail_plugins(imap): expire mail_plugins(pop3): expire mail_plugins(managesieve): 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 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): managesieve_logout_format(default): bytes=%i/%o managesieve_logout_format(imap): bytes=%i/%o managesieve_logout_format(pop3): bytes=%i/%o managesieve_logout_format(managesieve): bytes ( in=%i : out=%o ) namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmaster@example.com mail_plugins: expire mail_plugins: sieve auth default: mechanisms: plain login user: nobody verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=5000 gid=5000 home=/home/vmail/%Ld/%Ln allow_all_users=yes socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: root master: path: /var/run/dovecot/auth-master mode: 438 user: vmail group: vmail plugin: sieve: /home/vmail/%Ld/%Ln/.dovecot.sieve sieve_global_path: /home/vmail/globalsieverc sieve_dir: ~/sieve sieve_global_dir: /var/lib/dovecot/sieve/global/ expire: INBOX.Trash 7 INBOX.Mailing-Lists.* 30 INBOX.Spam 14 expire_dict: proxy::expire dict: expire: mysql:/etc/dovecot/dovecot-dict-expire.conf
Thanks, Christian
On Sat, 2011-01-22 at 08:27 +0100, cvb@kruemel.org wrote:
However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something?
If you didn't yet find out:
lda: mail_plugins: expire mail_plugins: sieve
The second mail_plugins setting overrides the first one. Use:
mail_plugins = expire sieve
On Thu, 10 Feb 2011 02:07:38 +0200, Timo Sirainen <tss@iki.fi> wrote:
However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something? If you didn't yet find out: lda: mail_plugins: expire mail_plugins: sieve The second mail_plugins setting overrides the first one. Use: mail_plugins = expire sieve
Thanks, this works to the extent that dates are now written into the database when mails are moved by sieve filters. What doesn't work (and I spent the last weeks testing and googling, hence my late reply) is the deletion of expired mails. When an expiration date occurs, the database is updated, but nothing is deleted.
I have implemented a test with a 1 day expiry. Dates get updated, nothing is deleted. Output of expire tool:
Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: expire: pattern=INBOX.Trash type=expunge secs=604800 Info: expire: pattern=INBOX.Mailing-Lists.test type=expunge secs=86400 Info: expire: pattern=INBOX.Spam type=expunge secs=2592000 Info: auth input: uid=5000 Info: auth input: gid=5000 Info: auth input: home=/home/vmail/example.com/user1 Info: Namespace: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail//:INDEX=/var/indexes/ Info: maildir++: root=/home/vmail/, index=/var/indexes, control=, inbox=/home/vmail/ Info: auth input: uid=5000 Info: auth input: gid=5000 Info: auth input: home=/home/vmail/example.com/user2 Info: Namespace: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail//:INDEX=/var/indexes/ Info: maildir++: root=/home/vmail/, index=/var/indexes, control=, inbox=/home/vmail/
Is this an issue with the mail_location setting? I know the wiki says something about a userdb lookup returning the mail location, but, frankly, I'm not sure what that's supposed to say...
Thanks.
participants (2)
-
cvb@kruemel.org
-
Timo Sirainen