Emails not visible after renaming folders

Germán Herrera g.herrera at ses.com.ar
Tue Jun 25 22:10:38 EEST 2019


Are you copying/moving the emails with {cp|mv} or with "doveadm 
{copy|move}"?

On 2019-06-25 12:00, Aleksandr via dovecot wrote:
> Hello,
> 
> I have strange problem with "losing" emails after rename mail
> folder(s) (via imap client: thunderbird, roundcude, etc..)
> 
> How to reproduce:
> 
> 1. Create some folder name, like TEST
> 2. Create sub-folder under TEST (like SUBTEST)
> 
> Structure:
> 
> TEST
>   |--SUBTEST
> 
> 
> # doveadm  mailbox list  -u postmaster at testmailbox
> Spam
> Trash
> Sent
> Drafts
> INBOX
> TEST
> TEST/SUBTEST
> 
> 3. Move (or copy) mails from INBOX to SUBTEST (all looks fine, and
> mails visible under SUBTEST)
> 4. Rename TEST folder to any new name, NEWTEST
> 
> Let`s try to view mails in mail client in NEWTEST-SUBTEST, folder have
> no emails :(
> 
> 
> mailsrv# doveadm -f table mailbox status -u postmaster at testmailbox
> "messages vsize" NEWTEST*
> mailbox      messages vsize
> NEWTEST         0        0
> NEWTEST/SUBTEST 0        0
> 
> If doveadm force-resync postmaster at testmailbox, mails will be visible 
> in INBOX
> 
> mailsrv# doveadm -f table mailbox status -u postmaster at testmailbox
> "messages vsize" INBOX*
> mailbox messages vsize
> INBOX   2        28
> 
> Dovecot installation: CentOS x86_64 Linux 7.5.1804
> 
> Storage: HDD Local Partition - XFS filesystem  / multi-dbox (mdbox) as
> mail_storage (this problem is not reproduced with the settings as
> Maildir storage !)
> somthing wrong with mapping indices.
> 
> 
> ---- [start] ----
> 
> # dovecot -n
> 
> # 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.21 (92477967)
> # OS: Linux 3.10.0-862.2.3.el7.x86_64 x86_64 CentOS Linux release
> 7.5.1804 (Core)
> # Hostname: xxxx
> auth_mechanisms = plain login digest-md5 cram-md5
> base_dir = /var/run/dovecot/
> default_client_limit = 20000
> default_login_user = dovecot
> default_process_limit = 10000
> dict {
>   quota = redis:host=127.0.0.1:prefix=user/:timeout_msecs=1000
> }
> disable_plaintext_auth = no
> first_valid_gid = 90
> first_valid_uid = 90
> imapc_features = rfc822.size fetch-headers
> imapc_host = xxxx
> imapc_user = %u
> lda_mailbox_autocreate = yes
> lda_mailbox_autosubscribe = yes
> login_greeting = xxxx.
> login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
> login_trusted_networks = 10.0.1.0/24
> mail_access_groups = mail
> mail_debug = yes
> mail_fsync = never
> mail_gid = 97
> mail_location =
> mdbox:~/mail/mailboxes:FULLDIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control:INBOX=~/mail/mailboxes/inbox
> mail_log_prefix = "%{session} %Us(%u): "
> mail_max_lock_timeout = 30 secs
> mail_plugins = quota  zlib
> mail_prefetch_count = 20
> mail_privileged_group = mail
> mail_uid = 97
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope
> encoded-character vacation subaddress comparator-i;ascii-numeric
> relational regex imap4flags copy include variables enotify environment
> mailbox date index ihave duplicate mime foreverypart extracttext
> vacation-seconds editheader
> mbox_lock_timeout = 30 secs
> mbox_very_dirty_syncs = yes
> mbox_write_locks = fcntl
> namespace inbox {
>   inbox = yes
>   list = yes
>   location =
>   mailbox Drafts {
>     auto = subscribe
>     special_use = \Drafts
>   }
>   mailbox Sent {
>     auto = subscribe
>     special_use = \Sent
>   }
>   mailbox Spam {
>     auto = subscribe
>   }
>   mailbox Trash {
>     auto = subscribe
>     special_use = \Trash
>   }
>   prefix =
>   separator = /
>   type = private
> }
> passdb {
>   args = /etc/dovecot/dovecot-ldap.conf
>   driver = ldap
> }
> plugin {
>   cgroup_basedir = /usr/sys/cgroup
>   hostingAccount = default
>   quota = dict:User quota::proxy::quota
>   quota_grace = 0%%
>   quota_over_flag_value = TRUE
>   quota_over_script = account-quota mismatch %u
>   quota_rule = *:storage=4T
>   quota_warning = storage=101%% account-quota block %u
>   quota_warning1 = -storage=100%% account-quota unblock %u
>   sieve = file:~/sieve;active=~/.dovecot.sieve
>   sieve_before = /home/sieve/%d/
>   sieve_extensions = +editheader +vacation-seconds -body
>   sieve_max_redirects = 200
>   sieve_vacation_min_period = 1s
>   trash_folder = Trash
>   zlib_save = lz4
>   zlib_save_level = 6
> }
> pop3_delete_type = expunge
> protocols = imap pop3 sieve
> service account-quota {
>   executable = script /usr/local/scripts/account-quota
>   unix_listener account-quota {
>     mode = 0666
>     user = dovecot
>   }
>   user = dovecot
> }
> service anvil {
>   chroot = /var/empty
>   client_limit = 0
>   drop_priv_before_exec = no
>   executable = anvil
>   extra_groups =
>   group = $default_internal_user
>   idle_kill = 4294967295 secs
>   privileged_group =
>   process_limit = 1
>   process_min_avail = 1
>   protocol =
>   service_count = 0
>   type = anvil
>   unix_listener anvil-auth-penalty {
>     group = $default_internal_user
>     mode = 0660
>     user = dovecot
>   }
>   unix_listener anvil {
>     group = $default_internal_user
>     mode = 0660
>     user = dovecot
>   }
>   user = $default_internal_user
>   vsz_limit = 18446744073709551615 B
> }
> service auth-worker {
>   chroot = /var/empty
>   user = $default_internal_user
> }
> service auth {
>   chroot = /var/empty
>   executable = /usr/libexec/dovecot/auth
>   unix_listener auth-client {
>     mode = 0660
>   }
>   unix_listener auth-master {
>     mode = 0666
>   }
>   unix_listener auth-userdb {
>     mode = 0777
>   }
>   user = $default_internal_user
> }
> service dict {
>   executable = /usr/libexec/dovecot/dict
>   unix_listener dict {
>     mode = 0600
>     user = $default_internal_user
>   }
> }
> service imap-login {
>   executable = /usr/libexec/dovecot/imap-login
>   inet_listener imap {
>     address = xxxxxxx
>     port = 143
>   }
>   process_limit = 10000
>   process_min_avail = 1
>   service_count = 0
>   user = dovecot
> }
> service imap {
>   executable = /usr/libexec/dovecot/imap
>   process_limit = 18000
>   process_min_avail = 1
>   service_count = 0
>   vsz_limit = 256 M
> }
> service lmtp {
>   process_limit = 10
> }
> service pop3-login {
>   executable = /usr/libexec/dovecot/pop3-login
>   inet_listener pop3 {
>     address = xxxxxx
>     port = 110
>   }
>   process_limit = 1000
>   process_min_avail = 1
>   service_count = 0
>   user = dovecot
>   vsz_limit = 256 M
> }
> service pop3 {
>   executable = /usr/libexec/dovecot/pop3
>   process_limit = 1000
>   process_min_avail = 1
>   service_count = 0
> }
> service send-warning {
>   executable = script /usr/local/scripts/send-warning
>   unix_listener send-warning {
>     mode = 0666
>     user = dovecot
>   }
>   user = dovecot
> }
> shutdown_clients = no
> ssl_cert = </etc/dovecot/xxxx.crt
> ssl_key =  # hidden, use -P to show it
> userdb {
>   args = /etc/dovecot/dovecot-ldap.conf
>   driver = ldap
> }
> verbose_proctitle = yes
> protocol lda {
>   mail_plugins = sieve quota cgroups zlib
> }
> protocol imap {
>   imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
>   mail_max_userip_connections = 50
>   mail_plugins = quota imap_quota mail_log notify cgroups zlib
> }
> protocol pop3 {
>   mail_max_userip_connections = 20
>   mail_plugins = quota cgroups zlib
>   pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
>   pop3_enable_last = no
>   pop3_no_flag_updates = yes
>   pop3_uidl_format = %08Xu%08Xv
> }
> ---- [end] ----
> 
> 
> Regards,
> 
> Aleksandr.


More information about the dovecot mailing list