[Dovecot] Trouble with expire plugin
Gedalya
gedalya at gedalya.net
Wed Jan 9 04:23:59 EET 2013
Anyone..?
Is there any further detail I can provide?
This is really puzzling me.
Gedalya
On 01/02/2013 06:44 PM, Gedalya wrote:
> Hi all,
>
> Maybe someone here can help me with this problem, not sure if this is
> a configuration issue or an actual bug.
>
> my daily cron job says:
>
> #!/bin/sh
> doveadm expunge -A mailbox Junk savedbefore 14d
> doveadm expunge -A mailbox Trash savedbefore 30d
> doveadm expunge -A mailbox "Trash.*" savedbefore 30d
>
> But it hasn't been deleting any messages in a long time, I'm not sure
> when it stopped working.
>
> I've also noticed that it does delete matching rows in the expires
> database (expire_stamp < savedbefore days).
> Furthermore, rows are deleted even when running doveadm search, and
> regardless of the mailbox column, i.e. even when != the mailbox name
> being searched!
> Anyway why should doveadm search delete rows in the expires database?
>
> The database is mysql.
>
> ---- dovecot -n ----
> # 2.1.7: /etc/dovecot/dovecot.conf
> # OS: Linux 3.2.0-0.bpo.3-amd64 x86_64 Debian 6.0.6
> auth_default_realm = xxxxxxx.com
> auth_mechanisms = plain login cram-md5
> auth_verbose = yes
> auth_verbose_passwords = plain
> default_client_limit = 8096
> dict {
> expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
> quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
> }
> disable_plaintext_auth = no
> mail_gid = vmail
> mail_plugins = quota expire listescape
> mail_uid = vmail
> managesieve_sieve_capability = fileinto envelope encoded-character
> subaddress comparator-i;ascii-numeric relational regex imap4flags copy
> include variables mailbox date ihave
> namespace {
> inbox = yes
> location =
> prefix =
> separator = /
> type = private
> }
> passdb {
> args = /etc/dovecot/dovecot-sql.conf.ext
> driver = sql
> }
> plugin {
> antispam_backend = pipe
> antispam_pipe_program = /usr/bin/ssh
> antispam_pipe_program_args =
> -l;spamd;-i;/etc/dovecot/sareport.key;mx1.xxxxxxx.com
> antispam_pipe_program_notspam_arg = revoke
> antispam_pipe_program_spam_arg = report
> antispam_pipe_tmpdir = /tmp
> antispam_spam = Junk
> antispam_trash_pattern_ignorecase = trash;Deleted *
> autocreate = Trash
> autocreate2 = Junk
> autocreate3 = Drafts
> autocreate4 = Sent
> autosubscribe = Trash
> autosubscribe2 = Junk
> autosubscribe3 = Drafts
> autosubscribe4 = Sent
> expire = Trash
> expire2 = Trash.*
> expire3 = Junk
> expire_dict = proxy::expire
> quota = dict:user::proxy::quota
> quota_rule = *:storage=2G
> quota_rule2 = Trash:storage=+250M
> quota_rule3 = Junk:ignore
> quota_warning = storage=99%% quota-warning 99 %u
> quota_warning2 = storage=95%% quota-warning 95 %u
> sieve = ~/.dovecot.sieve
> sieve_before = /var/local/lib/dovecot/sieve/global/fileinto-spam.sieve
> sieve_dir = ~/sieve
> sieve_extensions = -vacation -body -reject -enotify -environment
> -virustest -spamtest
> sieve_max_actions = 32
> sieve_max_redirects = 4
> sieve_max_script_size = 10K
> sieve_quota_max_scripts = 10
> }
> postmaster_address = postmaster at xxxxxxx.com
> protocols = imap pop3 lmtp sieve
> service auth-worker {
> user = $default_internal_user
> }
> service auth {
> client_limit = 20480
> unix_listener auth-userdb {
> group = root
> mode = 0600
> user = vmail
> }
> }
> service dict {
> unix_listener dict {
> mode = 0600
> user = vmail
> }
> }
> service imap-login {
> process_min_avail = 4
> service_count = 0
> vsz_limit = 128 M
> }
> service imap {
> process_limit = 10240
> }
> service lmtp {
> inet_listener lmtp {
> address = 0.0.0.0
> port = 7025
> }
> }
> service managesieve-login {
> inet_listener sieve {
> port = 4190
> }
> service_count = 0
> vsz_limit = 128 M
> }
> service pop3-login {
> process_min_avail = 4
> service_count = 0
> vsz_limit = 128 M
> }
> service pop3 {
> process_limit = 4096
> }
> service quota-warning {
> executable = script /usr/local/bin/quota-warning
> unix_listener quota-warning {
> user = vmail
> }
> user = vmail
> }
> ssl_cert = </etc/ssl/certs/dovecot.pem
> ssl_key = </etc/ssl/private/dovecot.pem
> userdb {
> driver = prefetch
> }
> userdb {
> args = /etc/dovecot/dovecot-sql.conf.ext
> driver = sql
> }
> verbose_proctitle = yes
> protocol lmtp {
> mail_plugins = quota expire listescape sieve
> }
> protocol lda {
> mail_plugins = quota expire listescape sieve
> }
> protocol imap {
> mail_max_userip_connections = 25
> mail_plugins = quota expire listescape autocreate imap_quota antispam
> ssl_cert = </etc/dovecot/imap.xxxxxxx.com.crt
> ssl_key = </etc/dovecot/imap.xxxxxxx.com.key
> }
> protocol sieve {
> mail_max_userip_connections = 10
> }
> protocol pop3 {
> mail_max_userip_connections = 10
> mail_plugins = quota expire listescape
> pop3_fast_size_lookups = yes
> pop3_lock_session = no
> pop3_no_flag_updates = yes
> pop3_reuse_xuidl = yes
> pop3_save_uidl = no
> pop3_uidl_format = %08Xu%08Xv
> ssl_cert = </etc/dovecot/pop.xxxxxxx.com.crt
> ssl_key = </etc/dovecot/pop.xxxxxxx.com.key
> }
>
>
> in dovecot-sql.conf.ext I have:
> iterate_query = SELECT userid as user, domain FROM email where deleted=0
>
>
> ---- dovecot-dict-sql.conf.ext ----
> connect = host=localhost dbname=email user=email
> 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
> }
> map {
> pattern = shared/expire/$user/$mailbox
> table = expires
> value_field = expire_stamp
> fields {
> username = $user
> mailbox = $mailbox
> }
> }
>
More information about the dovecot
mailing list