I have a Debian / Dovecot / Postfix standard setup. Additionally I am running notmuchmail indexer to quickly search for messages. As a mail client I use emClient on Windows, I also got Rainloop Webmail running.

I used notmuchmail to search for a particular message and i found it, received around 5 years ago. When I check with emClient, the messages dated back only until 3 1/2 years ago. First I suspected emClient to not have downloaded all messages, but then, checking with Rainloop, I also saw the oldest message visible via IMAP is 3 1/2 years old.

Searching the problem, it is suggested to resyncronize the mail client by deleting the dovecot-uidlist in my Maildir (https://www.dovecot.org/list/dovecot/2013-October/092803.html), which i did. emClient resynced all messages accordingly BUT nothing changed, the oldest message is 3 1/2 years old.

So now i am at a loss... Is there anything else i can do to have access to ALL my messages through IMAP. My Server is running Dovecot 2.2.13.

output "of dovecot -n"

# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.9
login_trusted_networks =
mail_location = maildir:~/Maildir
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 {
    special_use = \Drafts
  mailbox Junk {
    special_use = \Junk
  mailbox Sent {
    special_use = \Sent
  mailbox "Sent Messages" {
    special_use = \Sent
  mailbox Trash {
    special_use = \Trash
  prefix =
  separator = /
passdb {
  driver = pam
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
protocols = " imap sieve"
quota_full_tempfail = yes
service auth {
  unix_listener auth-userdb {
    mode = 0600
    user = username
service managesieve-login {
  inet_listener sieve {
    port = 4190
ssl = required
ssl_cert = </etc/letsencrypt/live/a.b.com/fullchain.pem
ssl_cipher_list = AES128+EECDH:AES128+EDH
ssl_dh_parameters_length = 2048
ssl_key = </etc/letsencrypt/live/a.b.com/privkey.pem
ssl_protocols = !SSLv2 !SSLv3
userdb {
  driver = passwd
protocol lda {
  info_log_path =
  log_path =
  mail_plugins = " sieve"
  • Please provide information on your configuration (doveconf -n) and check your mail log for relevant information. Also have a look at differences in file ownership/permissions.
    – Jens Erat
    Dec 11, 2017 at 10:17
  • Is there a guide what the permissions should be? cant seem to find it here: wiki.dovecot.org/MailboxFormat/Maildir and this doesnt apply since its not a shared mailbox: wiki.dovecot.org/SharedMailboxes/Permissions Dec 11, 2017 at 11:27
  • So there is nothing that seems to be related in the mail.err or mail.log, the permissions of the particular message that doesnt show up is the same as others that DO show up: -rw------- 1 myuser myuser 10395837 Oct 6 2013 Dec 11, 2017 at 11:33
  • There is no general guideline, Dovecot must be able to access the mail (but access mode should not be too permissive, either). The actual required permissions depend on the configuration, but any differences between messages that show up and others that do not would indicate a likely issue. If they're the same, you're probably fine.
    – Jens Erat
    Dec 11, 2017 at 22:45

1 Answer 1


Broken Indexes and Other Mailbox Issues

This sounds like an issue with a broken mailbox index, which is something Dovecot's usually very good at fixing on its own. In case it fails, you can force Dovecot to repair indexes and other issues using

doveadm force-resync -u <username> <mailbox>

in case of the user johndoe and mails not showing up in his inbox, the command would be

doveadm force-resync -u johndoe INBOX

Running doveadm -Dv force-resync ... (debug and verbose output) might provide more insight on any issues.

Client Side Issues

In rare cases, mail clients might suffer under inconsistent local data, especially when mails have been renumbered on the server side due to mailbox issues. Some mail clients know "repair" functions, other might require you to remove and recreate the mailbox and thus trigger a full sync.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .