Get your free beta license ↗
Mail · Dovecot

Messages copied into a mailbox do not appear

Last updated 30 Nov 2026
Summary

Messages you copy into a mailbox as root do not appear in the mail client. Changing the ownership of the copied files lets Dovecot read them.

Symptoms

After you copy a mailbox from another server or restore it by hand, some messages or entire folders are missing from the mail client. The storage figure from doveadm quota get reads error.

Look for Dovecot errors like these in /var/log/maillog on AlmaLinux or /var/log/mail.log on Ubuntu.

Output
Error: Mailbox INBOX: open(/home/USER/files/mail/example.com/user/cur/1764482402.M3P3.oldserver:2,S) failed: Permission denied (euid=1003(USER) egid=1003(USER) missing +r perm: ...)
Output
Error: Mailbox Archive: file_dotlock_create(/home/USER/files/mail/example.com/user/.Archive/dovecot-uidlist) failed: Permission denied (euid=1003(USER) egid=1003(USER) missing +w perm: /home/USER/files/mail/example.com/user/.Archive, dir owned by 0:0 mode=0755)

Cause

UrbeStack keeps each mailbox in the customer's home directory. The customer owns the mailbox, and Dovecot reads and writes it as that customer.

Files and folders you copy as root stay owned by root. Dovecot cannot read those files or write to those folders. Messages copied with the customer's ownership appear the next time the mailbox is accessed.

Resolution

  1. Find the mailbox directory.

    doveadm user -f home user@example.com
  2. Set the owner of the directory and everything in it to the customer. Use the path the previous command printed.

    chown -R USER:USER /home/USER/files/mail/example.com/user
  3. Have Dovecot read the mailbox again and recalculate its quota usage.

    doveadm force-resync -u user@example.com '*'
    doveadm quota recalc -u user@example.com
  4. Check that the storage figure is a number again.

    doveadm quota get -u user@example.com