Flags/tags lost when moving e-mails to another folder

spi spi at nurfuerspam.de
Wed Feb 22 13:53:38 UTC 2023


I faced the same issue and had to change from maildir to sdbox storage.
The imap labels are now stored centrally per folder in an index file and
not the filename anymore. Moving mails from one folder to another keeps
the lable intact now.


Am 22.02.23 um 11:20 schrieb Alexis Ben Miloud--Josselin:
> Hi,
>
> I have an issue with e-mail tags/flags. The IMAP user is using
> Thunderbird or Roundcube with Thunderbird tags.
>
> When the user (with an IMAP client) moves an e-mail from a
> folder to another, tags set on the e-mail are lost.
>
> When we check the filesystem, we can see the "a" tag:
>
>      -rw-rw---- 2 test mailusers 2498 Dec 29 15:31 'cur/1676643827.M563793P15241.<HOSTNAME>,S=2498,W=2551:2,a'
>
> When we move the e-mail to another folder, the tag disappear:
>
>      -rw-rw---- 2 test mailusers 2498 Dec 29 15:31 '.test/cur/1676644340.M214404P22014.<HOSTNAME>,S=2498,W=2551:2,'
>
> In both folders, the dovecot-keywords file is:
>
>      0 $LABEL1
>
> The problem appeared after a major system upgrade (Debian 9 to
> 10). Dovecot version went from 2.2.27 to 2.3.4.1.
>
> Some system informations:
>
>      # dovecot --version
>      2.3.4.1 (f79e8e7e4)
>      # cat /etc/debian_version
>      10.13
>      # uname -a
>      Linux <HOSTNAME> 4.19.0-23-amd64 #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64 GNU/Linux
>      # findmnt /var
>      TARGET SOURCE    FSTYPE OPTIONS
>      /var   /dev/vda3 ext4   rw,nosuid,relatime
>      # findmnt /home
>      TARGET SOURCE   FSTYPE OPTIONS
>      /home  /dev/vdb ext4   rw,nosuid,nodev,noexec,relatime
>
> The output of `dovecot -n output` is here (link expires in one year):
>
>      https://paste.evolix.org/?96d46acaea638568#56g7AQLuzJxxy4xintpexJCPgiAAG23c38irQGMkV4Rp
>
> Here are the operations I see on an e-mail file using strace:
>
>      15507 link("/home/test/Maildir/cur/1672326270.M619318P11927.<HOSTNAME>,S=2498,W=2551:2,Sa", "/home/test/Maildir/.test/tmp/1672326456.M737812P15507.<HOSTNAME>") = 0
>      15507 rename("/home/test/Maildir/.test/tmp/1672326456.M737812P15507.<HOSTNAME>", "/home/test/Maildir/.test/cur/1672326456.M737813P15507.<HOSTNAME>,S=2498,W=2551:2,S") = 0
>      15507 unlink("/home/test/Maildir/cur/1672326270.M619318P11927.<HOSTNAME>,S=2498,W=2551:2,Sa") = 0
>
> Setting mbox_lazy_writes to yes and/or unsetting
> mail_cache_fields doesn't change anything.
>
> Any idea of what I am missing? Could this be a bug in Dovecot?
>
> Thanks in advance,
>
> --
> Alexis Ben Miloud--Josselin <abenmiloud at evolix.fr>
> Evolix - Hébergement et Infogérance Open Source
> Marseille (37 rue Guibal, Pôle Média, 13003) / Paris / Montréal
> http://evolix.com | Twitter: @Evolix @EvolixNOC | http://blog.evolix.com

--
Cheers
spi



More information about the dovecot mailing list