I have a large mail backup folder backup at backup.invalid; I'm cleaning up daily like this: infimum=`date -d "-4 day" +"%Y-%m-%d"` doveadm expunge -u backup at backup.invalid mailbox INBOX SAVEDBEFORE $infimum doveadm purge -u backup at backup.invalid yet I see this: # find attachments/ -type f -ctime +5 | wc -l 7522 # find attachments/ -type f | wc -l 127579 # find attachments/ -type f -mtime +5 | wc -l 14361 # find attachments/ -type f | wc -l 127793 About 5.9% of the files in attachments and below are older than 5 days. Why? Is that normal? using dovecot 2:2.3.1-1 from the official repos. -- Ralf Hildebrandt Gesch?ftsbereich IT | Abteilung Netzwerk Charit? - Universit?tsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt at charite.de | https://www.charite.de
* Ralf Hildebrandt <Ralf.Hildebrandt at charite.de>:> I have a large mail backup folder backup at backup.invalid; I'm cleaning > up daily like this: > > infimum=`date -d "-4 day" +"%Y-%m-%d"` > doveadm expunge -u backup at backup.invalid mailbox INBOX SAVEDBEFORE $infimum > doveadm purge -u backup at backup.invalid > > yet I see this: > > # find attachments/ -type f -ctime +5 | wc -l > 7522 > # find attachments/ -type f | wc -l > 127579 > > # find attachments/ -type f -mtime +5 | wc -l > 14361 > # find attachments/ -type f | wc -l > 127793 > > About 5.9% of the files in attachments and below are older than 5 days. > Why? Is that normal? > > using dovecot 2:2.3.1-1 from the official repos.I retried this today (2:2.3.4.1-1~bionic): # find attachments/ -type f -ctime +5 | wc -l 193121 # find attachments/ -type f | wc -l 301885 193121 of 301885 (64%) are older (ctime) than 5 days, although I just purged everything older than 4 days? # /home/copymail# find attachments/ -type f -mtime +5 | wc -l 201629 # /home/copymail# find attachments/ -type f | wc -l 301900 201629 of 301900 (66.7%) files are modified (mtime) more than 5 days ago, although I just purged everything older than 4 days? -- Ralf Hildebrandt Gesch?ftsbereich IT | Abteilung Netzwerk Charit? - Universit?tsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt at charite.de | https://www.charite.de
On 12 Feb 2019, at 03:45, Ralf Hildebrandt via dovecot <dovecot at dovecot.org> wrote:> 201629 of 301900 (66.7%) files are modified (mtime) more than 5 days ago, although I just purged everything older than 4 days?I had problems with this a few years ago, and resorted to simply using find to remove the files from the file system /usr/bin/find /usr/local/virtual/*/.Junk*/{cur,new} -type f -mtime +7 -name ?*=*" -delete 2> /dev/null /usr/bin/find /usr/local/virtual/*/.Trash/{cur,new} -type f -mtime +7 -name ?*=*" -delete 2> /dev/null