Determining number of users on a qmail server
If you’ve got a qmail server with a large number of users spread out over hundreds of domains, how will you figure out how many users you have? I don’t know of any official way, but there are ways to guesstimate.
Let’s say you’re using vpopmail. Let’s say there’s a file called lastauth - telling you when each user last checked e-mail and from what IP address.
Then you could get a guesstimate of the number of users by doing this:
find /home/vpopmail/domains | grep lastauth > yourfile
This will take quite a while, if you’ve got many users.
Then check number of lines in that file, by typing:
wc -l yourfile
Finally remove yourfile
And no, I don’t provide support on this. This is for qmail admins, not regular users.
November 12th, 2005 at 10:07 pm
Why do not use:
`find /home/vpopmail/domains -name lastauth | wc -l’
?
It will do the exactly the same in one step, avoid additional grep call and doesn’t require a temporary file.
November 18th, 2005 at 12:14 pm
Another (and quicker) solution: If you have vpopmail with mysql support, you can count number of rows in vpopmail.vpopmail or vpopmail.lastauth.
select count(*) from vpopmail.vpopmail;