Robert Schetterer schrieb: > Timo Sirainen schrieb: >> On Thu, 2009-07-23 at 23:42 +0200, Robert Schetterer wrote: >>> Hi Timo, >>> all of my tests fail >>> with expire plugin, mail simply not get deleted >>> i cant find any stuff in the logs why it does not or should not work. >> Try with 1.2.2 and check the mails' save dates now that you have the >> FETCH X-SAVEDATE command available. >> > > Hi Timo, upgraded > last night and tested > X-SAVEDATE is now available, before it was not > so lets wait and see, if it now works, i will report > Hi Timo, still mails get not deleted i just did a new test
mysql> select mailbox, from_unixtime(expire_stamp), username from expireplugin; +---------+-----------------------------+-----------------------+ | mailbox | from_unixtime(expire_stamp) | username | +---------+-----------------------------+-----------------------+ | Trash | 2009-07-31 14:18:47 | rob...@schetterer.com | +---------+-----------------------------+-----------------------+ 1 row in set (0.00 sec) 2 select Trash * FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk \*)] Flags permitted. * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240758078] UIDs valid * OK [UIDNEXT 85] Predicted next UID * OK [HIGHESTMODSEQ 109] 2 OK [READ-WRITE] Select completed. 3 fetch 1:* (internaldate x-savedate) * 1 FETCH (INTERNALDATE "30-Jul-2009 14:18:26 +0200" X-SAVEDATE "30-Jul-2009 14:18:47 +0200") 3 OK Fetch completed. /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so Info: Quota root: name= backend=dict args=:proxy::quotadict Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Info: Quota warning: bytes=0 (80%) messages=0 command=/usr/local/bin/quota-warning.sh 80 Info: expire: pattern=Trash type=expunge secs=86400 Info: rob...@schetterer.com/Trash: stop, expire time in future: Fri Jul 31 14:18:47 2009 /usr/lib/dovecot/expire-tool.sh #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} MAIL_PLUGINS=${MAIL_PLUGINS//imap_acl/} #MAIL_PLUGINS=${MAIL_PLUGINS//virtual/} exec ${0%.sh} "$@ i still speculate the problem might be in the virtual plugin but anyway if its load or not by the script mails dont get deleted additional i integrated userdb_home userdb_mail in password_query but this also did not helped ( so perhaps some config stuff helps for debug ) password_query = SELECT username as user, password, \ 1001 as userdb_uid, \ 1001 as userdb_gid, \ "/usr/local/virtual/%u/" AS userdb_home, \ "maildir:/usr/local/virtual/%u/" AS userdb_mail \ FROM mailbox WHERE username = '%u' AND active = '1' AND (imap_allowed = '1' or '%Ls' = 'pop3') user_query = SELECT concat('/usr/local/virtual/', maildir) AS home, \ concat('*:bytes=', mailbox.quota) AS quota_rule, \ #when saving to Trash mailbox the user gets additional 50MB "Trash:storage=50240" AS quota_rule2, \ #when saving to Sent mailbox the user gets additional 50MB "Sent:storage=50240" AS quota_rule3, \ #when saving to Drafts mailbox the user gets additional 50MB "Drafts:storage=50240" AS quota_rule4, \ #when saving to Templates mailbox the user gets additional 50MB "Templates:storage=50240" AS quota_rule5, \ #when saving to Junk mailbox the user gets additional 50MB "Junk:storage=50240" AS quota_rule6, \ #ignore quota on shared #"shared:ignore" AS quota_rule7, \ concat('maildir:/usr/local/virtual/', maildir) AS mail, \ CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS namespace_1_inbox, \ CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS namespace_2_inbox, \ 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active = '1' namespace private { separator = / prefix = "" location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/%d/%u/ list = yes hidden = no subscriptions = yes } namespace private { prefix = "virtual/" separator = / location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++ hidden = yes list = no subscriptions= no } namespace private { prefix = "RealMails/" separator = / list = no hidden = yes location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/%d/%u/ } mail_location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/%d/%u/ expire = Trash 1 expire_dict = proxy::expire didnt include any logs cause i couldnt find any special but perhaps you know what to look for -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria