The 'frm' command will list the sender and subject of each message in the account's spool file, then 'wc -l' (that's a lowercase ell after the hyphen) will count the number of lines. The result is the number of messages in the spool file.
I only need to know how much email accounts are in a domain (they're more than 300 domains) once a month, for reporting purposes, Im new in this job, and theres no info about what each client is allowed (space, mail accounts, etc) counting by hand will take me a week each month.
What I really need is a way for monitoring
1. how much emails are in a domain (this is very important)
2. max. space allowed for each account (if is possible, less important)