Reputation: 19
I installed dovecot on Debian 9 server and everything works fine. But when I delete mails in my mail client and even delete the trash folder, the size of the files does not change. When sending/receiving new mails the dovecot.index.cache file gets bigger
Is that correct? Why is there no change in the file size when deleting mails?
drwx------ 2 vmail vmail 40K Mar 7 16:45 cur
-rw------- 1 vmail vmail 7.2K Mar 7 16:41 dovecot.index
-rw------- 1 vmail vmail 363K Mar 7 16:51 dovecot.index.cache
-rw------- 1 vmail vmail 3.9K Mar 7 16:45 dovecot.index.log
-rw------- 1 vmail vmail 58K Mar 7 16:41 dovecot.index.log.2
-rw------- 1 vmail vmail 46 Mar 5 08:33 dovecot-keywords
-rw------- 1 vmail vmail 96 Mar 4 12:23 dovecot.mailbox.log
-rw------- 1 vmail vmail 15K Mar 7 16:45 dovecot-uidlist
-rw------- 1 vmail vmail 8 Mar 4 12:23 dovecot-uidvalidity
-r--r--r-- 1 vmail vmail 0 Mar 4 12:23 dovecot-uidvalidity.5c7d18c9
drwx------ 5 vmail vmail 4.0K Mar 7 11:52 Drafts
-rw------- 1 vmail vmail 157 Mar 7 16:46 maildirsize
drwx------ 2 vmail vmail 4.0K Mar 7 16:45 new
drwx------ 5 vmail vmail 4.0K Mar 7 11:53 Sent
drwx------ 5 vmail vmail 4.0K Mar 5 14:39 Spam
-rw------- 1 vmail vmail 23 Mar 4 12:23 subscriptions
drwx------ 2 vmail vmail 4.0K Mar 7 16:45 tmp
drwx------ 5 vmail vmail 4.0K Mar 7 16:46 Trash
Upvotes: 1
Views: 3301
Reputation: 10903
Your doevecot seems to use maildir to store IMAP folder mail messages.
[Dovecot can use a few different storage methods]
In case of maildir: Check files in cur
and new
subfolders. There should be one file per message.
IMAP
protocol may mark messages as deleted without removing them "at once" from disk.
Inspect messages' single letter flags after ,
in message file name. Search for T
(Trashed) flag e.g. cur/897979431.meteor.42:2,FST
.
"Marking & removing" may be controlled by "expunge" options in email/IMAP client configuration.
https://en.wikipedia.org/wiki/Maildir
The specification defines flags which show whether the message has been read, deleted and so on: the initial (capital) letter of Passed, Replied, Seen, Trashed, Draft, and Flagged.[7]
Upvotes: 1