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.

2 Responses to “Determining number of users on a qmail server”

  1. seo black & white Says:

    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.

  2. EddieR Says:

    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;