Roundcube Community Forum

 

Dovecot not deleting mail physically

Started by rocketjack, September 19, 2025, 09:59:58 AM

Previous topic - Next topic

rocketjack

I am clearing the mail using roundcube and also deleting mails from trash and thus permenently deleting the mail. The mail quota changes. But mail still present in INBOX.EXPUNGED.Trash and also with refcount 1. The physical disk usage remains same and purge not deleting the mail physically, prob due to refcount.

1. Initial stage. 2 mails in inbox and around 14MB of usage.

doveadm -f table quota get -u [email protected]
Quota name  Type    Value  Limit                                                        %
mdbox quota STORAGE 14017 512000                                                        2
mdbox quota MESSAGE     2  10000                                                        0

doveadm -f table mailbox status -u [email protected] all INBOX
mailbox messages recent uidnext uidvalidity unseen highestmodseq vsize    guid                             firstsaved
INBOX   2        0      3       1758288242  0      5             14352516 c61ef0307259cd684d18000079f6831d 1758288243

doveadm -f table mailbox status -u [email protected] all INBOX.*
mailbox      messages recent uidnext uidvalidity unseen highestmodseq vsize guid                             firstsaved
INBOX.Drafts 0        0      1       1758288245  0      1             0     c91ef0307259cd684d18000079f6831d never
INBOX.Spam   0        0      1       1758288244  0      1             0     c81ef0307259cd684d18000079f6831d never
INBOX.Trash  0        0      1       1758288243  0      1             0     c71ef0307259cd684d18000079f6831d never

doveadm -f table mailbox status -u [email protected] all INBOX.*.*
mailbox messages recent uidnext uidvalidity unseen highestmodseq vsize guid firstsaved

doveadm -f table  fetch -u [email protected] "mailbox refcount user" mailbox INBOX all
mailbox refcount user
INBOX   1        [email protected]
INBOX   1        [email protected]

doveadm -f table  fetch -u [email protected] "mailbox refcount user" mailbox INBOX.* all
mailbox refcount user

doveadm -f table  fetch -u [email protected] "mailbox refcount user" mailbox INBOX.*.* all
mailbox refcount user

2. Deleted mail from Inbox and also from Trash. Mail quota got reduced. But mail exist in INBOX.EXPUNGED.Trash with refcount 1 and using disk storage.

doveadm -f table quota get -u [email protected]
Quota name  Type    Value  Limit                                                        %
mdbox quota STORAGE     0 512000                                                        0
mdbox quota MESSAGE     0  10000                                                        0

doveadm -f table mailbox status -u [email protected] all INBOX
mailbox messages recent uidnext uidvalidity unseen highestmodseq vsize guid                             firstsaved
INBOX   0        0      3       1758288242  0      7             0     c61ef0307259cd684d18000079f6831d never

doveadm -f table mailbox status -u [email protected] all INBOX.*
mailbox      messages recent uidnext uidvalidity unseen highestmodseq vsize guid                             firstsaved
INBOX.Drafts 0        0      1       1758288245  0      1             0     c91ef0307259cd684d18000079f6831d never
INBOX.Spam   0        0      1       1758288244  0      1             0     c81ef0307259cd684d18000079f6831d never
INBOX.Trash  0        0      3       1758288243  0      7             0     c71ef0307259cd684d18000079f6831d never

doveadm -f table mailbox status -u [email protected] all INBOX.*.*
mailbox              messages recent uidnext uidvalidity unseen highestmodseq vsize    guid                             firstsaved
INBOX.EXPUNGED.Trash 2        2      3       1758288246  0      3             14352516 c80d5b1f075ecd68eb4c000079f6831d 1758289415

doveadm -f table  fetch -u [email protected] "mailbox refcount user" mailbox INBOX all
mailbox refcount user

doveadm -f table  fetch -u [email protected] "mailbox refcount user" mailbox INBOX.* all
mailbox refcount user

doveadm -f table  fetch -u [email protected] "mailbox refcount user" mailbox INBOX.*.* all
mailbox              refcount user
INBOX.EXPUNGED.Trash 1        [email protected]
INBOX.EXPUNGED.Trash 1        [email protected]

The following options are checked in roundcube.

Maintenance
Clear Trash on logout   
Compact Inbox on logout

Is there anything missing in roundcube settings? Why refcount still shows as 1?