I was wondering if there was anything I could do in perl to be able to
connect to the IMAP server and report back the size of my mailbox?
I have had a quick look through Mail-IMAPClient and Net-IMAP-Simple, but
didn't see anything in there that would do what I wanted
Any ideas of how I might think about doing this? If indeed it is possible?
Thanks for any help or pointers
adam
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Yay, a question on this list I can answer. That happens so rarely. Of
course, this is completely OT for this list, so maybe that's why... :-)
RFC 2087 defines the quota extension for IMAP:
http://www.faqs.org/rfcs/rfc2087.html
The problem is that your sysadmins may not be using an IMAP server which
implements quotas--instead they may be using filesystem quotas on the mail
spool as a dodge. (This is exceedingly bad practice, btw, for reasons I
can go into if you're interested, but I was on the original IETF IMAP4rev1
working group, so I may be biased. :-)
It is very easy to determine by hand, before you spend any time coding,
which mechanism they're using (The lines starting with '>>>' represent
what you type, but you don't type the '>>>'):
% telnet <yourmailserver> imap
>>> 000 LOGIN <yourusername> "<yourpassword>"
000 OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS SCAN SORT
THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND QUOTA] User
<yourusername> authenticated
>>> 001 GETQUOTA ""
To the GETQUOTA command, you will receive either an OK, NO, or BAD. If
you get either OK or NO, it means that IMAP quotas are enabled. If you
get BAD, then it means they aren't.
If they aren't, you'll have to find out what the Windows client does and
reverse engineer it. Or maybe just ask your sysadmins--most of us are
willing to work with users when their requests are reasonable. (But then
again, in my personal experience, sysadmins who implement solutions using
Windows are less likely to be generally reasonable people. ;-)
Trey
--
Trey Harris
Vice President
SAGE -- The System Administrators Guild (www.sage.org)
Opinions above are not necessarily those of SAGE.
> Yay, a question on this list I can answer. That happens so rarely. Of
> course, this is completely OT for this list, so maybe that's why... :-)
>
> RFC 2087 defines the quota extension for IMAP:
The Net::IMAP module appears to support this extension.
But, I haven't used that module. It's at version 0.02, and it didn't
build and test cleanly for me using 5.6.0. Even so, it may be worth a
look.
sherm--
C programmers never die - they're just cast into void.