[Dbmail] Calculate mailbox size?

2009-08-05 Thread Simon
Hi There, We have a external client management app that we would like to be able to calculate the size of a dbmail mailbox with a SQL query. Can anyone give me some pointers here to get this right please? Thanks Simon ___ DBmail mailing list

Re: [Dbmail] Calculate mailbox size?

2009-08-05 Thread Jonathan Feally
Well, If you are looking for the used space of the user in general, then dbmail_users.curmail_size is the column you want. SELECT curmail_size FROM dbmail_users WHERE userid=theuser; But I think you want to get a per mailbox (folder) look, so: SELECT users.userid user, mbx.name mailbox,

Re: [Dbmail] Calculate mailbox size?

2009-08-05 Thread Jonathan Feally
OK - 2nd try forgot the WHERE msg.status 2 If you don't include the msg.status 2, then you will be counting all messages, whether deleted or not. status=2 deleted (expunge done), status=3 deleted waiting for purge run to actually be deleted. Well, If you are looking for the used space of