DM> Assume you have a connection context with the dbmail database. DM> 1. Query the users table to get the quota value in maxmail_size for a DM> specific user and store the user_idnr around in a variable for use in DM> the next step. DM> 2. Query the messageblk table where messageblk_idnr = user_idnr and sum DM> the blocksize field for all messages returned for a particular user. DM> That should yield you a total bytes stored for a single mailbox. DM> 3. Compare summed bytes against maxmail_size bytes however you desire.
Can you give me the sample in SQL? Thanks.