Hello,
I just went through the entire code based for this tool and didn't have any errors with it. My test was as follows
Code:
[root@server new]# pwd
/home/admin/imap/test.com/char/Maildir/.INBOX.spam/new
[root@server new]# ll
total 8
-rwxr-xr-x 1 admin mail 178 Jul 7 00:28 pack.sh
-rw-r--r-- 1 admin mail 5 Nov 25 01:26 test
[root@server new]# ll
total 4
-rw-r--r-- 1 admin mail 5 Nov 25 01:26 test
[root@server new]#
Where I just grabbed a random file with an old timestamp and put it into the folder. I created a new file, and put it in the folder. I ran DA in debug mode. Level 600 will give you info on the purging tool. This is the debug output I got from that
Code:
empty_file_for_user(char, test.com, spambox, 60): days: 60
Emptying /home/admin/imap/test.com/char/Maildir/.INBOX.spam: days=60
email user /home/admin/imap/test.com/char/Maildir/.INBOX.spam
checking pack.sh : no date in name
** Deleting: pack.sh
checking test : no date in name
So likely, the only difference between your files and mine would be the "date in name". My random files didn't have timestamps in them, so DA defaulted to using the system timestamp via the stat() function. If there is a timestamp in the filename itself, DA will search for "%d.", meaning the first number it finds that is followed by a dot. That number would be assumed to be the timestamp of the file. If it was an incorrect number, that could explain your missing files.
A sample filename is:
Code:
1257540811.H855755P781.server.hostname.com:2,S
The timestamp in the filename is "1257540811". If you turn that into human time, it would read "Fri, 06 Nov 2009 13:53:31 -0700", more or less, depending on your timezone, etc...
So any "wrong number" in that time in the filename could be the cause of the file being deleted. If you have backups of your Maildir/.INBOX.spam directory, you could keep reloading the files in there to duplicate the issue repeatedly to get a better picture, then let me know.
Anyway, if you want to run DA in debug mode to see what it's deciding, this feature has a lot of handy debug code for it's decisin making, so that might help figure out what's going on in your case.
Code:
cd /usr/local/directadmin
killall -9 directadmin
./directadmin b600
then issue the purge on some other account to see what it does.
If anyone else is also noticing weird behavior with this tool, mention it here.
And yes, 356 was a typo, I've changed it to 365 for the next release. It would have resulted in DA doing the code for emails older than 356 days instead of 365.
John