Hello, I've configured dovecot to use expire plugin: heres my dovecot -n:
# 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.1 ext4 auth_mechanisms = plain login dict { expire = mysql:/etc/dovecot/dovecot-dict-expire-sql.conf.ext } mail_location = maildir:/home/mail/vhosts/%d/%n mail_plugins = expire mail_privileged_group = 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 ihave namespace inbox { inbox = yes location = mailbox Drafts { auto = no special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { expire = Trash 7 expire_dict = proxy::expire sieve = ~/dovecot.sieve sieve_dir = ~/sieve sieve_max_actions = 32 sieve_max_redirects = 4 sieve_max_script_size = 1M sieve_quota_max_scripts = 32 } protocols = imap pop3 lmtp sieve service auth-worker { user = vmail } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-userdb { mode = 0600 user = vmail } user = dovecot } service imap-login { inet_listener imap { port = 0 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } service_count = 1 vsz_limit = 128 M } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 995 ssl = yes } } ssl = required ssl_ca = </etc/ssl/my_certs/sub.class1.server.ca.pem ssl_cert = </etc/ssl/private/chig.in/mail/mail.chig.in.crt ssl_key = </etc/ssl/private/chig.in/mail/mail.chig.in.key userdb { args = uid=vmail gid=vmail home=/home/mail/vhosts/%d/%n driver = static } protocol lmtp { mail_plugins = expire sieve } protocol sieve { mail_max_userip_connections = 10 managesieve_implementation_string = Cyrus timsieved v2.2.13 managesieve_logout_format = bytes=%i/%o managesieve_max_compile_errors = 5 }
What exactly I did....
dovecot.conf dict { expire = mysql:/etc/dovecot/dovecot-dict-expire-sql.conf.ext }
/etc/dovecot/dovecot-dict-expire-sql.conf.ext connect = host=127.0.0.1 dbname=mailserver user=mail password=SOMEPASS
map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp
fields { username = $user mailbox = $mailbox } }
conf.d/10-mail.conf mail_plugins = expire
conf.d/90-plugin.conf plugin { #setting_name = value expire = Trash 7 expire_dict = proxy::expire }
Created table in mysql server mysql> show create table expires; +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | expires | CREATE TABLE
expires
(username
varchar(75) NOT NULL,mailbox
varchar(255) NOT NULL,expire_stamp
int(11) NOT NULL, PRIMARY KEY (username
,mailbox
)ENGINE=InnoDB DEFAULT CHARSET=utf8 | +---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
And nothing works dovecot debug shows nothing: only one string related to expire plugin Aug 24 04:21:37 piscola dovecot: lmtp(16927): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_expire_plugin.so
mysql general query log show nothing also...
Can anyone help me please? Thanks a lot!