Qmail : Trick

If you are using vpopmail and qmail to host virtual domains, you can get a list of all the aliases in a domain by using valias. The syntax is
valias -s DOMAIN_YOU_WANT_TO_LIST_ALIASES

If you want to list the users (and NOT aliases) in a domain, you can use vuserinfo. The syntax is
vuserinfo -D DOMAIN_YOU_WANT_TO_LIST_USERS