CMD_SHOW_USER showing 2 gigs being used by e-mail while CMD_EMAIL_POP shows 42 megs.

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
1,066
E-mail disk space shown as used on CMD_SHOW_USER page shows 2+ gigs of e-mail space being used by the user while the total for all mail boxes shown on CMD_EMAIL_POP page comes out to 42 megs.

Either it isn't calculating correctly or I have a lot of mail hiding somewhere. I purged the spam folders and ran:
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
It didn't help.

If this rings a bell with someone, let me know how you fixed it. Otherwise I'll start dissecting the problem.
 
You can use the find command to find all files owned by a given user; see man find for documentation. On our CentOS boxes, we'd call it this way:
Code:
# find / -user USERNAME
where USERNAME is replaced by the actual username (case sensitive).

You should probably redirect the output to a file so you can search for stuff not in the normal paths.

You can use grep:
Code:
# find / -user USERNAME | grep -r home/USERNAME
to make sure you only find stuff NOT in the usual home directory path.[/code]

Jeff
 
I was hoping you would answer. I know by your avatar who you are and anybody 130 years old is bound to know something.:D

I found several hundred thousand .mbox files. Apparently DA creates an .mbox file for each message during the conversion and I'm guessing the reason they are still there is because there were too many to where it couldn't delete them when it finished. I'll have to make up a script to get rid of them or delete and recreate the directories they are in. There are far too many for rm to handle via wildcard.

Thanks!
 
You can also use "find" to delete the files as it finds them.

Code:
-exec rm {}

But be careful of your "find" parameters.
 
You can use grep:
Code:
# find / -user USERNAME | grep -r home/USERNAME
to make sure you only find stuff NOT in the usual home directory path.

I think you want:

Code:
find / -user USERNAME | grep -v home/USERNAME
 
I think you want:
Code:
find / -user USERNAME | grep -v home/USERNAME
I tried something similar,
find ./ -type f -name "*.mbox" -exec rm -f {} \;
but when it finished, all the files were still there.:mad:

So then I got ticked and piped find into a .sh file, added the rm -v in front of the lines, flagged it, and ran it. That worked.:D

Thanks!

PS: 360,162 fewer files on the disk
 
Last edited:
So then I got ticked and piped find into a .sh file, added the rm -v in front of the lines, flagged it, and ran it. That worked.:D
Frankly, that's what I usually do. My text editor (joe) has a nice macro facility :).

Jeff
 
Back
Top