Discussion:
[horde] finding size of a mailbox?
Adrian Chadd
2004-10-21 02:37:33 UTC
Permalink
Hi all,

Is there some little call in CVS Horde I can make to find out how big
a mailbox is in bytes?

I've found calls to find out how many read/unread/total messages there
are, but not something which returns the size of the entire mailbox.

Thanks!




Adrian
--
Adrian Chadd The University of Western Australia
<***@ucs.uwa.edu.au> CRICOS: 00126G
Ph: +61 8 6488 2574
Mob: +61 421 597 819
Jan Schneider
2004-10-21 06:34:06 UTC
Permalink
Post by Adrian Chadd
Is there some little call in CVS Horde I can make to find out how big
a mailbox is in bytes?
I've found calls to find out how many read/unread/total messages there
are, but not something which returns the size of the entire mailbox.
Not in Horde, but in IMP. See lib/Quota*.

Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
Adrian Chadd
2004-10-21 07:10:42 UTC
Permalink
Post by Jan Schneider
Post by Adrian Chadd
Is there some little call in CVS Horde I can make to find out how big
a mailbox is in bytes?
I've found calls to find out how many read/unread/total messages there
are, but not something which returns the size of the entire mailbox.
Not in Horde, but in IMP. See lib/Quota*.
Ah, yes, i meant IMP. I'm sorry.

I looked at that but this assumes we're running with some form of quota
support. We're running dovecot on our mail servers.

I don't strictly need the quota information, just an idea of how big
a given mailbox is. At the moment I'm leaning towards writing something
to fetch the "index" for a given mailbox and then adding the message
sizes. Does anyone have any suggestions on what I should look at?
--
Adrian Chadd The University of Western Australia
<***@ucs.uwa.edu.au> CRICOS: 00126G
Ph: +61 8 6488 2574
Mob: +61 421 597 819
Chuck Hagenbuch
2004-10-21 11:23:17 UTC
Permalink
Post by Adrian Chadd
I don't strictly need the quota information, just an idea of how big
a given mailbox is. At the moment I'm leaning towards writing something
to fetch the "index" for a given mailbox and then adding the message
sizes. Does anyone have any suggestions on what I should look at?
http://www.php.net/manual/en/function.imap-mailboxmsginfo.php

-chuck
--
"But she goes not abroad in search of monsters to destroy." - John
Quincy Adams
Adrian Chadd
2004-10-22 03:23:14 UTC
Permalink
Post by Chuck Hagenbuch
Post by Adrian Chadd
I don't strictly need the quota information, just an idea of how big
a given mailbox is. At the moment I'm leaning towards writing something
to fetch the "index" for a given mailbox and then adding the message
sizes. Does anyone have any suggestions on what I should look at?
http://www.php.net/manual/en/function.imap-mailboxmsginfo.php
Thanks, but I've already looked at the php imap calls
I just wanted to know if there was something in IMP I could call
to do this, which would work with both IMAP and POP3.
I really don't like changes which may cause headaches for the
poor sods who inherit my code :-)

Is there somewhere in IMP I can extract this? If not, where would the
best place be to add in this feature so I can at least "fail" for pop3?
I'm still fumbling my way around the IMP Mailbox classes, I'm having
trouble even reliably obtaining an index for a mailbox.



Adrian
--
Adrian Chadd The University of Western Australia
<***@ucs.uwa.edu.au> CRICOS: 00126G
Ph: +61 8 6488 2574
Mob: +61 421 597 819
Adrian Chadd
2005-02-04 16:18:12 UTC
Permalink
Post by Chuck Hagenbuch
Post by Adrian Chadd
I don't strictly need the quota information, just an idea of how big
a given mailbox is. At the moment I'm leaning towards writing something
to fetch the "index" for a given mailbox and then adding the message
sizes. Does anyone have any suggestions on what I should look at?
http://www.php.net/manual/en/function.imap-mailboxmsginfo.php
Thanks, but I've already looked at the php imap calls
I just wanted to know if there was something in IMP I could call
to do this, which would work with both IMAP and POP3.
I really don't like changes which may cause headaches for the
poor sods who inherit my code :-)

Is there somewhere in IMP I can extract this? If not, where would the
best place be to add in this feature so I can at least "fail" for pop3?
I'm still fumbling my way around the IMP Mailbox classes, I'm having
trouble even reliably obtaining an index for a mailbox.



Adrian
--
Adrian Chadd The University of Western Australia
<***@ucs.uwa.edu.au> CRICOS: 00126G
Ph: +61 8 6488 2574
Mob: +61 421 597 819
Chuck Hagenbuch
2005-02-04 16:18:11 UTC
Permalink
Post by Adrian Chadd
I don't strictly need the quota information, just an idea of how big
a given mailbox is. At the moment I'm leaning towards writing something
to fetch the "index" for a given mailbox and then adding the message
sizes. Does anyone have any suggestions on what I should look at?
http://www.php.net/manual/en/function.imap-mailboxmsginfo.php

-chuck
--
"But she goes not abroad in search of monsters to destroy." - John
Quincy Adams
Adrian Chadd
2005-02-04 16:18:11 UTC
Permalink
Post by Jan Schneider
Post by Adrian Chadd
Is there some little call in CVS Horde I can make to find out how big
a mailbox is in bytes?
I've found calls to find out how many read/unread/total messages there
are, but not something which returns the size of the entire mailbox.
Not in Horde, but in IMP. See lib/Quota*.
Ah, yes, i meant IMP. I'm sorry.

I looked at that but this assumes we're running with some form of quota
support. We're running dovecot on our mail servers.

I don't strictly need the quota information, just an idea of how big
a given mailbox is. At the moment I'm leaning towards writing something
to fetch the "index" for a given mailbox and then adding the message
sizes. Does anyone have any suggestions on what I should look at?
--
Adrian Chadd The University of Western Australia
<***@ucs.uwa.edu.au> CRICOS: 00126G
Ph: +61 8 6488 2574
Mob: +61 421 597 819
Jan Schneider
2005-02-04 16:18:11 UTC
Permalink
Post by Adrian Chadd
Is there some little call in CVS Horde I can make to find out how big
a mailbox is in bytes?
I've found calls to find out how many read/unread/total messages there
are, but not something which returns the size of the entire mailbox.
Not in Horde, but in IMP. See lib/Quota*.

Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
Loading...