History mails are stored in the tmp/ directory
Sven Hartge
sven at svenhartge.de
Tue Jul 21 11:41:45 EEST 2020
On 20.07.20 10:19, lty wrote:
>>> On 20/07/2020 10:37 lty <lty at cndns.com> wrote:
>>> We found that there are historically corrupted mails in the tmp/
>>> directory,
>>> For example, Maildir/tmp/ or Maildir/.Drafts/tmp/ exists.
>>> We suspect that it may be caused by network transmission, or the user
>>> interrupted the network link.
>>> Can the dovecot team possibly fix this problem?
>>> dovecot --version
>>> 2.2.36
>> Not sure what the problem to fix would be though. It should be safe to
>> just rm those files. When dovecot is moving/storing mails with
>> maildir, it will first write them under tmp/ *and* if the operation is
>> succesful, then they are linked to destination and unlinked from tmp/.
> Can tmp/ directory mail be stored for a long time?
> Can dovecot handle tmp/ historical mail by itself?
The tmp/ directory in Maildir should never contain anything for longer
than a few milliseconds.
If anything is in there, there was some kind of error or interruption in
the past (the ctime of the file should tell you, when it happened).
As Aki said, the files can be deleted safely. You may want to check if
the contents of the file are equivalent to any other mail in the Maildir
in question or manually move the file to cur/ on your own, to make the
mail visible to the user.
If you have many files in tmp/ then something is wrong with you system
or storage and you need to investigate this, since this is absolutely
not normal.
Grüße,
Sven.
More information about the dovecot
mailing list