Thunderbird changes file names in Maildir folder
Whenever I put a mail in my Maildir/.Send/cur/ folder and I view this email in Thunderbird, suddenly, the file name has changed to something like this:
1573421271.M387702P15858.domain.com:2,S
This is fine for me, if not Thunderbird is very inconsistent. Sometimes this doesn't happen.
Is it possible to turn off this feature?
Or, can I figure out the meaning of these numbers? I understand that the first one is the epoch. What about the number after the point?
Thanks
Top Answer/Comment:
1573421271.M387702P15858.domain.com:2,S
This is actually the standard file name format for messages inside a Maildir.
Names within the cur subdirectory are not fully static: the part after : is an information/flags field indicating, among other things, whether the message has been seen (read), whether it has been replied to or forwarded, and so on.
So Thunderbird needs to rename the file in order to mark the message as 'read'; and if the file previously had some arbitrary name (invalid according to Maildir standards), normally the app ends up generating a new valid name prefix for it as well.
The main part of the name (to the left of :) consists of various unique identifiers chosen by the mail app (or generally by the mail delivery program, or IMAP server). Their only purpose is to make sure the filename is unique, so that multiple deliveries to the same folder will never conflict with each other.
For example, M387702 is the number of microseconds from the same epoch time, P15858 is the process ID of the program which performed the delivery, V<num> and I<num> would be the file's device and inode numbers.
(The spec doesn't say that the prefix has to contain parseable information – it just has to be unique. However, there might be comma-separated extension fields providing extra information to some mail services such as Dovecot.)
Is it possible to turn off this feature?
No. Thunderbird is just following the Maildir format rules.
You can claim that any sufficiently unique prefix is valid – and the format spec would agree – but as soon as the message is moved from new/ to cur/ it must have the :2,<flags> suffix appended.
So e.g. cur/My Little Message.eml:2, is a valid name but cur/My Little Message.eml alone is not.
- https://cr.yp.to/proto/maildir.html
- https://wiki2.dovecot.org/MailboxFormat/Maildir
상단 광고의 [X] 버튼을 누르면 내용이 보입니다