This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Caută ajutor

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Află mai multe

Acest fir de discuție a fost arhivat. Adresează o întrebare nouă dacă ai nevoie de ajutor.

compacting local inbox which is a symbolic link

  • 3 răspunsuri
  • 1 are această problemă
  • 11 vizualizări
  • Ultimul răspuns de Wayne Mery

more options

Why does Thunderbird only mark messages in a folder as deleted rather than actually deleting them immediately from the folder itself? Deleted messages are only removed from a folder when it's compacted - why is this extra step necessary?

Compacting folders that are Linux symbolic links results in the following unexpected behaviour:

I have a PC running linux and use the folder <thunderbird profile>/Mail/Local\ Folders/Inbox to keep messages that I move from the remote e-mail server to my local machine. Since other linux e-mail clients traditionally look for mail in /var/spool/mail/<username>, I've set up Inbox as a symbolic link to the relevant file in /var/spool/mail. This works fine - I can read messages in the folder and new messages moved to the folder appear immediately. But when I delete a message and compact the folder to remove it from the folder itself, Inbox becomes an actual regular file in <thunderbird profile>/Mail/Local\ Folders with the deleted messages removed, leaving the original file in /var/spool/mail that it was pointing to unchanged. Why does Thunderbird do this?

I suppose I won't have this problem if I create a hard link instead, since Linux hard links are to all intents and purposes regular files. Bu I can't do this on my machine because my /home directory is on a different partition from the root / directory.

Why does Thunderbird only mark messages in a folder as deleted rather than actually deleting them immediately from the folder itself? Deleted messages are only removed from a folder when it's compacted - why is this extra step necessary? Compacting folders that are Linux symbolic links results in the following unexpected behaviour: I have a PC running linux and use the folder <thunderbird profile>/Mail/Local\ Folders/Inbox to keep messages that I move from the remote e-mail server to my local machine. Since other linux e-mail clients traditionally look for mail in /var/spool/mail/<username>, I've set up Inbox as a symbolic link to the relevant file in /var/spool/mail. This works fine - I can read messages in the folder and new messages moved to the folder appear immediately. But when I delete a message and compact the folder to remove it from the folder itself, Inbox becomes an actual regular file in <thunderbird profile>/Mail/Local\ Folders with the deleted messages removed, leaving the original file in /var/spool/mail that it was pointing to unchanged. Why does Thunderbird do this? I suppose I won't have this problem if I create a hard link instead, since Linux hard links are to all intents and purposes regular files. Bu I can't do this on my machine because my /home directory is on a different partition from the root / directory.

Toate răspunsurile (3)

more options

re : Why does Thunderbird only mark messages in a folder as deleted rather than actually deleting them immediately from the folder itself? Deleted messages are only removed from a folder when it's compacted - why is this extra step necessary?

When you delete an email, it appears to be removed from Inbox and goes to 'Deleted' folder. In reality, it is 'marked as deleted' and remains in Inbox but hidden.

This allows the facility to recover an accidentally deleted email by immediately using 'Undo Delete Message' which changes the 'mark' to reveal the email again. Even if the 'Deleted' folder is emptied or some form of corruption has occurred in the Inbox, it is possible to open the mbox file and change the X-Mozilla-Status: number to recover the email.

Compacting locates the points showing 'marked as deleted' emails within the file and removes that section of the file containing that email. This completely removes the email and recovers space reducing the file size. Nothing can be Undone or recovered if nothing exists, hence why using 'Delete' does not by default auto compact immediately.

more options

Thank you - now I understand that requiring folders to be compacted increases the possibility of recovering accidentally deleted messages. But when compacting a folder which is a symbolic link, why does Thunderbird not just follow the link and operate on the contents of the file the link points to? As I said, compacting a symbolic link breaks the link and creates a new copy of the file with the deleted e-mails removed, leaving the original file that was pointed to unchanged.

more options

I don't know for sure if what you are seeing is a bug or just not supported. Perhaps you shouldn't be doing that - using a symbolic link.

FWIW, https://mzl.la/2dIi2G3 are bug reports that mention hard link and symbolic link