1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 08:12:48 +01:00
imapsync/W/learn/imapclient_quota_qq

32 lines
704 B
Plaintext
Raw Normal View History

2015-12-03 18:16:32 +01:00
#!/usr/bin/perl -w
use lib '/g/public_html/imapsync/W/Mail-IMAPClient-3.37/lib/' ;
use Mail::IMAPClient;
$ARGV[3] or die "usage: $0 host user password quotaroot\n";
$host = $ARGV[0];
$user = $ARGV[1];
$password = $ARGV[2];
$quotaroot = $ARGV[3];
print "Mail::IMAPClient::VERSION $Mail::IMAPClient::VERSION\n" ;
my $imap = Mail::IMAPClient->new( ) ;
$imap->Debug( 1 ) ;
$imap->Server( $host ) ;
$imap->Ssl( 1 ) ;
$imap->Showcredentials( 0 ) ;
$imap->connect( ) or die ;
$imap->IsUnconnected( ) ;
$imap->User( $user ) ;
$imap->Password( $password ) ;
$imap->login( ) or die ;
$imap->Uid( 1 ) ;
$imap->Peek( 1 ) ;
$imap->getquotaroot( $quotaroot ) ;
$imap->getquota( '""' ) ;
$imap->logout( ) ;