IMAP-Admin-1.6.8/0000755000175000017500000000000012677543071011744 5ustar ericericIMAP-Admin-1.6.8/META.yml0000644000175000017500000000066412677543071013223 0ustar ericeric--- abstract: unknown author: - unknown build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: IMAP-Admin no_index: directory: - t - inc requires: {} version: v1.6.8 IMAP-Admin-1.6.8/Admin.pm0000644000175000017500000006757312677542670013360 0ustar ericeric# IMAP::Admin - perl module for helping ease the administration of imap servers package IMAP::Admin; use strict; use Carp; use IO::Select; use IO::Socket; #use IO::Socket::INET; use Cwd; use vars qw($VERSION); $VERSION = '1.6.8'; sub new { my $class = shift; my $self = {}; my @defaults = ( 'Port' => 143, 'Separator' => '.', 'CRAM' => 0, ); bless $self, $class; if ((scalar(@_) % 2) != 0) { croak "$class called with incorrect number of arguments"; } unshift @_, @defaults; %{$self} = @_; # set up parameters; $self->{'CLASS'} = $class; $self->_initialize; return $self; } sub _initialize { my $self = shift; if (!defined($self->{'Server'})) { croak "$self->{'CLASS'} not initialized properly : Server parameter missing"; } if (!defined($self->{'Login'})) { croak "$self->{'CLASS'} not initialized properly : Login parameter missing"; } if (!defined($self->{'Password'})) { croak "$self->{'CLASS'} not initialized properly : Password parameter missing"; } if ($self->{'CRAM'} != 0) { my $cram_try = "use Digest::HMAC; use Digest::MD5; use MIME::Base64;"; eval $cram_try; } if (defined($self->{'SSL'})) { # attempt SSL connection instead # construct array of ssl options my $cwd = cwd; my %ssl_defaults = ( 'SSL_use_cert' => 0, 'SSL_verify_mode' => 0x00, 'SSL_key_file' => $cwd."/certs/client-key.pem", 'SSL_cert_file' => $cwd."/certs/client-cert.pem", 'SSL_ca_path' => $cwd."/certs", 'SSL_ca_file' => $cwd."/certs/ca-cert.pem", ); my @ssl_options; my $ssl_key; my $key; foreach $ssl_key (keys(%ssl_defaults)) { if (!defined($self->{$ssl_key})) { $self->{$ssl_key} = $ssl_defaults{$ssl_key}; } } foreach $ssl_key (keys(%{$self})) { if ($ssl_key =~ /^SSL_/) { push @ssl_options, $ssl_key, $self->{$ssl_key}; } } my $SSL_try = "use IO::Socket::SSL"; eval $SSL_try; # $IO::Socket::SSL::DEBUG = 1; if (!eval { $self->{'Socket'} = IO::Socket::SSL->new(PeerAddr => $self->{'Server'}, PeerPort => $self->{'Port'}, Proto => 'tcp', Reuse => 1, Timeout => 5, @ssl_options); }) { $self->_error("initialize", "couldn't establish SSL connection to", $self->{'Server'}, "[$!]"); delete $self->{'Socket'}; return; } } else { if ($self->{'Server'} =~ /^\//) { if (!eval { $self->{'Socket'} = IO::Socket::UNIX->new(Peer => $self->{'Server'}); }) { delete $self->{'Socket'}; $self->_error("initialize", "couldn't establish connection to", $self->{'Server'}); return; } } else { if (!eval { $self->{'Socket'} = IO::Socket::INET->new(PeerAddr => $self->{'Server'}, PeerPort => $self->{'Port'}, Proto => 'tcp', Reuse => 1, Timeout => 5); }) { delete $self->{'Socket'}; $self->_error("initialize", "couldn't establish connection to", $self->{'Server'}); return; } } } my $fh = $self->{'Socket'}; my $try = $self->_read; # get Banner if ($try !~ /\* OK/) { $self->close; $self->_error("initialize", "bad response from", $self->{'Server'}, "[", $try, "]"); return; } # this section was changed to accomodate motd's print $fh "try CAPABILITY\n"; $try = $self->_read; while ($try !~ /^\* CAPABILITY/) { # we have a potential lockup, should alarm this $try = $self->_read; } $self->{'Capability'} = $try; $try = $self->_read; if ($try !~ /^try OK/) { $self->close; $self->_error("initialize", "Couldn't do a capabilites check [", $try, "]"); return; } if ($self->{'CRAM'} > 0) { if ($self->{'Capability'} =~ /CRAM-MD5/) { _do_cram_login($self); } else { if ($self->{'CRAM'} > 1) { print $fh qq{try LOGIN "$self->{'Login'}" "$self->{'Password'}"\n}; } else { $self->close; $self->_error("initialize","CRAM not reported in Capability check and fallback to PLAIN not selected", $self->{'Server'}, "[", $self->{'Capability'}, "]"); return; } } } else { print $fh qq{try LOGIN "$self->{'Login'}" "$self->{'Password'}"\n}; } $try = $self->_read; if ($try !~ /^try OK/) { # should tr this response $self->close; $self->_error("initialize", $try); return; } else { $self->{'Error'} = "No Errors"; return; } # fall thru, can it be hit ? $self->{'Error'} = "No Errors"; return; } # this routine uses evals to prevent errors regarding missing modules sub _do_cram_login { my $self = shift; my $fh = $self->{'Socket'}; my $ans; print $fh "try AUTHENTICATE CRAM-MD5\n"; my $try = $self->_read; # gets back the postal string ($ans) = (split(' ', $try, 2))[1]; my $cram_eval = " my \$hmac = Digest::HMAC->new(\$self->{'Password'}, 'Digest::MD5'); \$hmac->add(decode_base64(\$ans)); \$ans = encode_base64(\$self->{'Login'}.' '.\$hmac->hexdigest, ''); "; eval $cram_eval; print $fh "$ans\n"; return; } sub _error { my $self = shift; my $func = shift; my @error = @_; $self->{'Error'} = join(" ",$self->{'CLASS'}, "[", $func, "]:", @error); return; } sub error { my $self = shift; return $self->{'Error'}; } sub _read { my $self = shift; my $buffer = ""; my $char = ""; my $bytes = 1; while ($bytes == 1) { $bytes = sysread $self->{'Socket'}, $char, 1; if ($bytes == 0) { if (length ($buffer) != 0) { return $buffer; } else { return; } } else { if (($char eq "\n") or ($char eq "\r")) { if (length($buffer) == 0) { # cr or nl left over, just eat it } else { return $buffer; } } else { # print "got char [$char]\n"; $buffer .= $char; } } } } sub close { my $self = shift; if (!defined($self->{'Socket'})) { return 0; } my $fh = $self->{'Socket'}; print $fh "try logout\n"; my $try = $self->_read; close($self->{'Socket'}); delete $self->{'Socket'}; return 0; } sub create { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if ((scalar(@_) != 1) && (scalar(@_) != 2)) { $self->_error("create", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; if (scalar(@_) == 1) { # a partition exists print $fh qq{try CREATE "$mailbox" $_[0]\n}; } else { print $fh qq{try CREATE "$mailbox"\n}; } my $try = $self->_read; if ($try =~ /^try OK/) { $self->{'Error'} = 'No Errors'; return 0; } else { $self->_error("create", "couldn't create", $mailbox, ":", $try); return 1; } } sub rename { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if ((scalar(@_) != 2) && (scalar(@_) != 3)) { $self->_error("rename", "incorrect number of arguments"); return 1; } my $old_name = shift; my $new_name = shift; my $partition = shift; my $fh = $self->{'Socket'}; if (defined $partition) { print $fh qq{try RENAME "$old_name" "$new_name" $partition\n}; } else { print $fh qq{try RENAME "$old_name" "$new_name"\n}; } my $try = $self->_read; if (($try =~ /^try OK/) || ($try =~ /^\* OK/)) { $self->{'Error'} = 'No Errors'; return 0; } else { $self->_error("rename", "couldn't rename", $old_name, "to", $new_name, ":", $try); return 1; } } sub delete { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if (scalar(@_) != 1) { $self->_error("delete", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try DELETE "$mailbox"\n}; my $try = $self->_read; if ($try =~ /^try OK/) { $self->{'Error'} = 'No Errors'; return 0; } else { $self->_error("delete", "couldn't delete", $mailbox, ":", $try); return 1; } } sub h_delete { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if (scalar(@_) != 1) { $self->_error("h_delete", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; # first get a list of all sub boxes then nuke them, accumulate errors # then do something intelligent with them (hmmmmm) my $box = join($self->{'Separator'}, $mailbox, "*"); my @sub_boxes = $self->list($box); push @sub_boxes, $mailbox; # uncomment following line if you are sanity checking h_delete # print "h_delete: got this list of sub boxes [@sub_boxes]\n"; foreach $box (@sub_boxes) { print $fh qq{try DELETE "$box"\n}; my $try = $self->_read; if ($try =~ /^try OK/) { $self->{'Error'} = 'No Errors'; } else { $self->_error("h_delete", "couldn't delete", $mailbox, ":", $try); return 1; # or just return on the first encountered error ? } } return 0; } sub get_quotaroot { # returns an array or undef my $self = shift; my (@quota, @info); if (!defined($self->{'Socket'})) { return 1; } if (!($self->{'Capability'} =~ /QUOTA/)) { $self->_error("get_quotaroot", "QUOTA not listed in server's capabilities"); return 1; } if (scalar(@_) != 1) { $self->_error("get_quotaroot", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try GETQUOTAROOT "$mailbox"\n}; my $try = $self->_read; while ($try =~ /^\* QUOTA/) { if ($try !~ /QUOTAROOT/) { # some imap servers give this extra line @info = ($try =~ /QUOTA\s(.*?)\s\(STORAGE\s(\d+)\s(\d+)/); push @quota, @info; } $try = $self->_read; } if ($try =~ /^try OK/) { return @quota; } else { $self->_error("get_quotaroot", "couldn't get quota for", $mailbox, ":", $try); return; } } sub get_quota { # returns an array or undef my $self = shift; my (@quota, @info); if (!defined($self->{'Socket'})) { return; } if (!($self->{'Capability'} =~ /QUOTA/)) { $self->_error("get_quota", "QUOTA not listed in server's capabilities"); return; } if (scalar(@_) != 1) { $self->_error("get_quota", "incorrect number of arguments"); return; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try GETQUOTA "$mailbox"\n}; my $try = $self->_read; while ($try =~ /^\* QUOTA/) { @info = ($try =~ /QUOTA\s(.*?)\s\(STORAGE\s(\d+)\s(\d+)/); push @quota, @info; $try = $self->_read; } if ($try =~ /^try OK/) { return @quota; } else { $self->_error("get_quota", "couldn't get quota for", $mailbox, ":", $try); return; } } sub set_quota { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if (!($self->{'Capability'} =~ /QUOTA/)) { $self->_error("set_quota", "QUOTA not listed in server's capabilities"); return 1; } if (scalar(@_) != 2) { $self->_error("set_quota", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $quota = shift; my $fh = $self->{'Socket'}; if ($quota eq "none") { print $fh qq{try SETQUOTA "$mailbox" ()\n}; } else { print $fh qq{try SETQUOTA "$mailbox" (STORAGE $quota)\n}; } my $try = $self->_read; if ($try =~ /^try OK/) { $self->{'Error'} = "No Errors"; return 0; } else { $self->_error("set_quota", "couldn't set quota for", $mailbox, ":", $try); return 1; } } sub subscribe { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if (scalar(@_) != 1) { $self->_error("subscribe", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try SUBSCRIBE "$mailbox"\n}; my $try = $self->_read; if ($try !~ /^try OK/) { $self->_error("subscribe", "couldn't suscribe ", $mailbox, ":", $try); return 1; } $self->{'Error'} = 'No Errors'; return 0; } sub unsubscribe { my $self = shift; if (!defined($self->{'Socket'})) { return 1; } if (scalar(@_) != 1) { $self->_error("unsubscribe", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try UNSUBSCRIBE "$mailbox"\n}; my $try = $self->_read; if ($try !~ /^try OK/) { $self->_error("unsubscribe", "couldn't unsuscribe ", $mailbox, ":", $try); return 1; } $self->{'Error'} = 'No Errors'; return 0; } sub select { # returns an array or undef my $self = shift; my @info; if (!defined($self->{'Socket'})) { return 1; } if (scalar(@_) != 1) { $self->_error("select", "incorrect number of arguments"); return; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try SELECT "$mailbox"\n}; my $try = $self->_read; while ($try =~ /^\* (.*)/) { # danger danger (could lock up needs timeout) push @info, $1; $try = $self->_read; } if ($try =~ /^try OK/) { return @info; } else { $self->_error("select", "couldn't select", $mailbox, ":", $try); return; } } sub expunge { # returns an array or undef my $self = shift; my @info; if (!defined($self->{'Socket'})) { return 1; } if (scalar(@_) != 0) { $self->_error("expunge", "incorrect number of arguments"); return; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try EXPUNGE\n}; my $try = $self->_read; while ($try =~ /^\* (.*)/) { # danger danger (could lock up needs timeout) push @info, $1; $try = $self->_read; } if ($try =~ /^try OK/) { return @info; } else { $self->_error("expunge", "couldn't expunge", $mailbox, ":", $try); return; } } sub get_acl { # returns an array or undef my $self = shift; if (!defined($self->{'Socket'})) { return; } if (!($self->{'Capability'} =~ /ACL/)) { $self->_error("get_acl", "ACL not listed in server's capabilities"); return; } if (scalar(@_) != 1) { $self->_error("get_acl", "incorrect number of arguments"); return; } my $mailbox = shift; my $fh = $self->{'Socket'}; print $fh qq{try GETACL "$mailbox"\n}; delete $self->{'acl'}; my $try = $self->_read; while ($try =~ /^\*\s+ACL\s+/) { my $acls = ($try =~ /^\* ACL\s+(?:\".*?\"|\S*)\s+(.*)/)[0]; # separate out the acls my @acls = ($acls =~ /(\".*?\"|\S+)\s*/g); # split up over ws, unless quoted push @{$self->{'acl'}}, @acls; $try = $self->_read; } if ($try =~ /^try OK/) { return @{$self->{'acl'}}; } else { $self->_error("get_acl", "couldn't get acl for", $mailbox, ":", $try); return; } } sub set_acl { my $self = shift; my ($id, $acl); if (!defined($self->{'Socket'})) { return 1; } if (!($self->{'Capability'} =~ /ACL/)) { $self->_error("set_acl", "ACL not listed in server's capabilities"); return 1; } if (scalar(@_) < 2) { $self->_error("set_acl", "too few arguments"); return 1; } if ((scalar(@_) % 2) == 0) { $self->_error("set_acl", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; while(@_) { $id = shift; $acl = shift; print $fh qq{try SETACL "$mailbox" "$id" "$acl"\n}; my $try = $self->_read; if ($try !~ /^try OK/) { $self->_error("set_acl", "couldn't set acl for", $mailbox, $id, $acl, ":", $try); return 1; } } $self->{'Error'} = 'No Errors'; return 0; } sub delete_acl { my $self = shift; my ($id, $acl); if (!defined($self->{'Socket'})) { return 1; } if (!($self->{'Capability'} =~ /ACL/)) { $self->_error("delete_acl", "ACL not listed in server's capabilities"); return 1; } if (scalar(@_) < 1) { $self->_error("delete_acl", "incorrect number of arguments"); return 1; } my $mailbox = shift; my $fh = $self->{'Socket'}; while(@_) { $id = shift; print $fh qq{try DELETEACL "$mailbox" "$id"\n}; my $try = $self->_read; if ($try !~ /^try OK/) { $self->_error("delete_acl", "couldn't delete acl for", $mailbox, $id, $acl, ":", $try); return 1; } } return 0; } sub list { # wild cards are allowed, returns array or undef my $self = shift; my (@info, @mail); if (!defined($self->{'Socket'})) { return; } if (scalar(@_) != 1) { $self->_error("list", "incorrect number of arguments"); return; } my $list = shift; my $fh = $self->{'Socket'}; print $fh qq{try LIST "" "$list"\n}; my $try = $self->_read; while ($try =~ /^\* LIST.*?\) \".\" \"*(.*?)\"*$/) { # danger danger (could lock up needs timeout) " <- this quote makes emacs happy push @mail, $1; $try = $self->_read; } if ($try =~ /^try OK/) { return @mail; } else { $self->_error("list", "couldn't get list for", $list, ":", $try); return; } } # Autoload methods go after =cut, and are processed by the autosplit program. 1; __END__ =head1 NAME IMAP::Admin - Perl module for basic IMAP server administration =head1 SYNOPSIS use IMAP::Admin; $imap = IMAP::Admin->new('Server' => 'name.of.server.com', 'Login' => 'login_of_imap_administrator', 'Password' => 'password_of_imap_adminstrator', 'Port' => port# (143 is default), 'Separator' => ".", # default is a period 'CRAM' => 1, # off by default, can be 0,1,2 'SSL' => 1, # off by default # and any of the SSL_ options from IO::Socket::SSL ); $err = $imap->create("user.bob"); if ($err != 0) { print "$imap->{'Error'}\n"; } if ($err != 0) { print $imap->error; } $err = $imap->create("user.bob", "green"); $err = $imap->delete("user.bob"); $err = $imap->h_delete("user.bob"); $err = $imap->subscribe("user.bob"); $err = $imap->unsubscribe("user.bob"); $err = $imap->rename("bboard", "newbboard"); $err = $imap->rename("bboard", "newbboard", "partition"); @quota = $imap->get_quotaroot("user.bob"); @quota = $imap->get_quota("user.bob"); $err = $imap->set_quota("user.bob", 10000); @acl = $imap->get_acl("user.bob"); %acl = $imap->get_acl("user.bob"); $err = $imap->set_acl("user.bob", "admin", "lrswipdca", "joe", "lrs"); $err = $imap->delete_acl("user.bob", "joe", "admin"); @list = $imap->list("user.bob"); @list = $imap->list("user.b*"); $imap->{'Capability'} # this contains the Capabilities reply from the IMAP server $imap->close; # close open imap connection =head1 DESCRIPTION IMAP::Admin provides basic IMAP server adminstration. It provides functions for creating and deleting mailboxes and setting various information such as quotas and access rights. It's interface should, in theory, work with any RFC compliant IMAP server, but I currently have only tested it against Carnegie Mellon University's Cyrus IMAP and Mirapoint's IMAP servers. It does a CAPABILITY check for specific extensions to see if they are supported. Operationally it opens a socket connection to the IMAP server and logs in with the supplied login and password. You then can call any of the functions to perform their associated operation. Separator on the new call is the hiearchical separator used by the imap server. It is defaulted to a period ("/" might be another popular one). CRAM on the new call will attempt to use CRAM-MD5 as the login type of choice. A value of 0 means off, 1 means on, 2 means on with fallback to login. *Note* this options requires these perl modules: Digest::MD5, Digest::HMAC, MIME::Base64 SSL on the new call will attempt to make an SSL connection to the imap server. It does not fallback to a regular connection if it fails. It is off by default. IO::Socket::SSL requires a ca certificate, a client certificate, and a client private key. By default these are in current_directory/certs, respectively named ca-cert.pem, client-cert.pem, and client-key.pem. The location of this can be overridden by setting SSL_ca_file, SSL_cert_file, and SSL_key_file (you'll probably want to also set SSL_ca_path). If you start the name of the server with a / instead of using tcp/ip it'll attempt to use a unix socket. I generated my ca cert and ca key with openssl: openssl req -x509 -newkey rsa:1024 -keyout ca-key.pem -out ca-cert.pem I generated my client key and cert with openssl: openssl req -new -newkey rsa:1024 -keyout client-key.pem -out req.pem -nodes openssl x509 -CA ca-cert.pem -CAkey ca-key.pem -req -in req.pem -out client-cert.pem -addtrust clientAuth -days 600 Setting up SSL Cyrus IMAP v 2.x (completely unofficial, but it worked for me) add these to your /etc/imapd.conf (remember to change /usr/local/cyrus/tls to wherever yours is) tls_ca_path: /usr/local/cyrus/tls tls_ca_file: /usr/local/cyrus/tls/ca-cert.pem tls_key_file: /usr/local/cyrus/tls/serv-key.pem tls_cert_file: /usr/local/cyrus/tls/serv-cert.pem For my server key I used a self signed certificate: openssl req -x509 -newkey rsa:1024 -keyout serv-key.pem -out serv-cert.pem -nodes -extensions usr_cert (in openssl.cnf I have nsCertType set to server) I also added this to my /etc/cyrus.conf, it shouldn't strictly be necessary as clients that are RFC2595 compliant can issue a STARTTLS to initiate the secure layer, but currently IMAP::Admin doesn't issue this command (in SERVICES section): imap2 cmd="imapd -s" listen="simap" prefork=0 where simap in /etc/services is: simap 993/tcp # IMAP over SSL =head2 MAILBOX FUNCTIONS RFC2060 commands. These should work with any RFC2060 compliant IMAP mail servers. create makes new mailboxes. Cyrus IMAP, for normal mailboxes, has the user. prefix. create returns a 0 on success or a 1 on failure. An error message is placed in the object->{'Error'} variable on failure. create takes an optional second argument that is the partition to create the mailbox in (I don't know if partition is rfc or not, but it is supported by Cyrus IMAP and Mirapoint). delete destroys mailboxes. The action delete takes varies from server to server depending on it's implementation. On some servers this is a hierarchical delete and on others this will delete only the mailbox specified and only if it has no subfolders that are marked \Noselect. If you wish to insure a hierarchical delete use the h_delete command as it deletes starting with the subfolders and back up to the specified mailbox. delete returns a 0 on success or a 1 on failure. An error message is placed in the object->{'Error'} variable on failure. h_delete hierarchical delete (I don't believe this is RFC anything) deletes a mailbox and all sub-mailboxes/subfolders that belong to it. It basically gets a subfolder list and does multiple delete calls. It returns 0 on sucess or a 1 on failure with the error message from delete being put into the object->{'Error'} variable. Don't forget to set your Separator if it's not a period. list lists mailboxes. list accepts wildcard matching subscribe/unsubscribe does this action on given mailbox. rename renames a mailbox. IMAP servers seem to be peculiar about how they implement this, so I wouldn't necessarily expect it to do what you think it should. The Cyrus IMAP server will move a renamed mailbox to the default partition unless a partition is given. You can optionally supply a partition name as an extra argument to this function. select selects a mailbox to work on. You need the 'r' acl to select a mailbox. This command selects a mailbox that mailbox related commands will be performed on. This is not a recursive command so sub-mailboxes/folders will not be affected unless for some bizarre reason the IMAP server has it implemented as recursive. It returns an error or an array that contains information about the mailbox. For example: FLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded $MDNSent NonJunk Junk $Label7) OK [PERMANENTFLAGS (\Deleted)] 2285 EXISTS 2285 RECENT OK [UNSEEN 1] OK [UIDVALIDITY 1019141395] OK [UIDNEXT 293665] OK [READ-WRITE] Completed expunge permanently removes messages flagged with \Deleted out of the current selected mailbox. It returns a list of message sequence numbers that it deleted. You need to select a mailbox before you expunge. You need to read section 7.4.1 of RFC2060 to interpret the output. Essentially each time a message is deleted the sequence numbers all get decremented so you can see the same message sequence number several times in the list of deleted messages. In the following example (taken from the RFC) messages 3, 4, 7, and 11 were deleted: * 3 EXPUNGE * 3 EXPUNGE * 5 EXPUNGE * 8 EXPUNGE . OK EXPUNGE completed =head2 QUOTA FUNCTIONS RFC2087 imap extensions. These are supported by Cyrus IMAP and Mirapoint. get_quotaroot and get_quota retrieve quota information. They return an array on success and undef on failure. In the event of a failure the error is place in the object->{'Error'} variable. The array has three elements for each item in the quota. $quota[0] <- mailbox name $quota[1] <- quota amount used in kbytes $quota[2] <- quota in kbytes set_quota sets the quota. The number is in kilobytes so 10000 is approximately 10Meg. set_quota returns a 0 on success or a 1 on failure. An error message is placed in the object->{'Error'} variable on failure. To delete a quota do a set_quota($mailbox, "none"); =head2 ACCESS CONTROL FUNCTIONS RFC2086 imap extensions. These are supported by Cyrus IMAP, Mirapoint and probably many others. get_acl retrieves acl information. It returns an array on success and under on failure. In the event of a failure the error is placed in the object->{'Error'} variable. The array contains a pair for each person who has an acl on this mailbox $acl[0] user who has acl information $acl[1] acl information $acl[2] next user ... You could also treat the return from get_acl as a hash, in which case the user is the key and the acl information is the value. set_acl set acl information for a single mailbox. You can specify more the one user's rights on the same set call. It returns a 0 on success or a 1 on failure. An error message is placed in the object->{'Error'} variable on failure. delete_acl removes acl information on a single mailbox for the given users. You can specify more the one users rights to be removed in the same delete_acl call. It returns a 0 on success or a 1 on failure. An error message is placed int the object->{'Error'} variable on failure. standard rights (rfc2086): l - lookup (mailbox is visible to LIST/LSUB commands) r - read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL, SEARCH, and COPY) s - keep seen/unssen information across sessions (STORE SEEN flag) w - write (STORE flags other then SEEN and DELETED) i - insert (perform APPEND and COPY into mailbox) p - post (send mail to submission address for mailbox) c - create (CREATE new sub-mailboxes) (*note* allows for delete of sub mailboxes as well) d - delete (STORE DELETED flag, perform EXPUNGE) a - administer (perform SETACL) The access control information is from Cyrus IMAP. read = "lrs" post = "lrsp" append = "lrsip" write = "lrswipcd" all = "lrswipcda" =head1 KNOWN BUGS Currently all the of the socket traffic is handled via prints and _read. This means that some of the calls could hang if the socket connection is broken. Eventually the will be properly selected and timed. =head1 LICENSE This is licensed under the Artistic license (same as perl). A copy of the license is included in this package. The file is called Artistic. If you use this in a product or distribution drop me a line, 'cause I am always curious about that... =head1 AUTHOR Eric Estabrooks, eric@urbanrage.com =head1 SEE ALSO perl(1). =cut IMAP-Admin-1.6.8/examples/0000755000175000017500000000000012677543071013562 5ustar ericericIMAP-Admin-1.6.8/examples/create.pl0000644000175000017500000000112411244310754015345 0ustar ericeric#!/usr/local/bin/perl use IMAP::Admin; if (scalar(@ARGV) < 1) { print "usage: $0 mailbox [mailbox ...] } $imap = IMAP::Admin->new('Server' => 'my.server.com', 'Login' => 'admin', 'Password' => 'adminpass'); foreach $mailbox (@ARGV) { $err = $imap->create($mailbox); if ($err != 0) { print "Error occurred building $mailbox\n\t$imap->{'Error'}\n"; } # if you have Cyrus IMAP you could also do lines like these # $err = $imap->set_quota($mailbox, 10000); # $err = $imap->set_acl($mailbox, 'admin', 'lrswipcda'); # the c and d are the minimum needed to delete mailboxes in cyrus 2.x } IMAP-Admin-1.6.8/examples/delete.pl0000644000175000017500000000055711244310754015355 0ustar ericeric#!/usr/local/bin/perl use IMAP::Admin; if (scalar(@ARGV) < 1) { print "usage: $0 mailbox [mailbox ...] } $imap = IMAP::Admin->new('Server' => 'my.server.com', 'Login' => 'admin', 'Password' => 'adminpass'); foreach $mailbox (@ARGV) { $err = $imap->delete($mailbox); if ($err != 0) { print "Error occurred destroying $mailbox\n\t$imap->{'Error'}\n"; } } IMAP-Admin-1.6.8/MANIFEST0000644000175000017500000000046412677543071013101 0ustar ericericAdmin.pm Changes MANIFEST Makefile.PL test.pl examples/create.pl examples/delete.pl certs/ca-cert.pem certs/client-cert.pem certs/client-key.pem META.yml Module meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) IMAP-Admin-1.6.8/certs/0000755000175000017500000000000012677543071013064 5ustar ericericIMAP-Admin-1.6.8/certs/ca-cert.pem0000644000175000017500000000207211244310754015073 0ustar ericeric-----BEGIN CERTIFICATE----- MIIC8zCCAlygAwIBAgIBADANBgkqhkiG9w0BAQQFADBgMQswCQYDVQQGEwJVUzES MBAGA1UECBMJTWlubmVzb3RhMQ8wDQYDVQQHEwZSYW1zZXkxCzAJBgNVBAoTAk1l MQswCQYDVQQLEwJDQTESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTAwMTAyNjEwMDcz N1oXDTAwMTEyNTEwMDczN1owYDELMAkGA1UEBhMCVVMxEjAQBgNVBAgTCU1pbm5l c290YTEPMA0GA1UEBxMGUmFtc2V5MQswCQYDVQQKEwJNZTELMAkGA1UECxMCQ0Ex EjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA nLRMBi1TEa33mr5+pWTP1K5NQ7D302W3zmwQRj1Irm7y3IVgU+zE02grbMgX4g1G 9jsX/7pzg8kDdechGT2itvoU/qFjnAOhK+Modfu5PXkNPrpv5lSByL8G/W+rVjzZ tU432gjdMXoItlwjMpATAG445LJPexDwFOrsa2w3njMCAwEAAaOBvDCBuTAdBgNV HQ4EFgQUv4rXaVnAMsiQofEqIkcjUG+o0wAwgYkGA1UdIwSBgTB/gBS/itdpWcAy yJCh8SoiRyNQb6jTAKFkpGIwYDELMAkGA1UEBhMCVVMxEjAQBgNVBAgTCU1pbm5l c290YTEPMA0GA1UEBxMGUmFtc2V5MQswCQYDVQQKEwJNZTELMAkGA1UECxMCQ0Ex EjAQBgNVBAMTCWxvY2FsaG9zdIIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEB BAUAA4GBACleX7waDe1GJwK9gQV58t/C36PEEHpDdOhhWH+rWxMIPpiFwskhBioC kXmMXDfEBmlf9McW/vFAfbdfoU7mGju578QDGgohpbQuF25bqdPBWnAW8iiUGlxb ATvH/VJ4/KAmA/m/tQxjLx6YA5NFPB2BbENmSgC82a/kdZB63xrc -----END CERTIFICATE----- IMAP-Admin-1.6.8/certs/client-cert.pem0000644000175000017500000000165011244310754015767 0ustar ericeric-----BEGIN TRUSTED CERTIFICATE----- MIICYTCCAcoCAQ0wDQYJKoZIhvcNAQEEBQAwYDELMAkGA1UEBhMCVVMxEjAQBgNV BAgTCU1pbm5lc290YTEPMA0GA1UEBxMGUmFtc2V5MQswCQYDVQQKEwJNZTELMAkG A1UECxMCQ0ExEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0wMDEwMjYxNjU0MTlaFw0w MjA2MjExNjU0MTlaMIGRMQswCQYDVQQGEwJVUzESMBAGA1UECBMJTWlubmVzb3Rh MQ8wDQYDVQQHEwZSYW1zZXkxEzARBgNVBAoTCklNQVAtQWRtaW4xETAPBgNVBAsT CHRlc3Qga2V5MRIwEAYDVQQDEwlsb2NhbGhvc3QxITAfBgkqhkiG9w0BCQEWEmVy aWNAdXJiYW5yYWdlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqSls Nf3qhIWdL68Z3ErP5RHg1mtMuDa0Ckw1CvWeKktaf+MPWYqSdAsFilw4LFGxZmEt EpdRgLaQZBeObD/BoPLbszp0jtkDXi9WAtzOEabxY8cguFcGwF0orweOUfFusd7L OXiU4S03Iz8UbzPWL4m2VBtCfRK7H4+ZU3sma1UCAwEAATANBgkqhkiG9w0BAQQF AAOBgQA0sjoksQoMbxFmXI66Fwt5h+rHU+1Hc2fpTcFMLXct2uS2ba78bPvkXCEf qaS1doQ62s8xWE6XZITOq22cilTgmyHgPDqKu4Cr5EgAT0iu+gx3QCsbQ2CvaBFA 6hVFwcoVS0eYOTzOi/cLCFG3dpSCvkOiUlyaNS1eVoVzNLnGGzAYMAoGCCsGAQUF BwMCoAoGCCsGAQUFBwMB -----END TRUSTED CERTIFICATE----- IMAP-Admin-1.6.8/certs/client-key.pem0000644000175000017500000000156711244310754015631 0ustar ericeric-----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQCpKWw1/eqEhZ0vrxncSs/lEeDWa0y4NrQKTDUK9Z4qS1p/4w9Z ipJ0CwWKXDgsUbFmYS0Sl1GAtpBkF45sP8Gg8tuzOnSO2QNeL1YC3M4RpvFjxyC4 VwbAXSivB45R8W6x3ss5eJThLTcjPxRvM9YvibZUG0J9Ersfj5lTeyZrVQIDAQAB AoGBAI3gVge6nNTlE36Ix5HBlTe0lPSBLelayAnS/LHiavNiG9ci4x7gYBC/pbfz vJE/OyB45EqxawQfGl84epVDq+sqQWK8iZtDE0Lp1+L6+I9RXgNwZN4DH7NVwuhS OJ5buP7zGgR1Yhqyk1F9B74CHpgeV1A0uHEDD/uvyjcPYLVJAkEA1yAEbSk8mBMd wWIil+yD/YyFLQUlo87Kru9xgMxJph1alOFLE2Gcqp9LdERXzljAi6VIT5cS1KYO 19ObOzYkHwJBAMlNsD7/vdZFjp9dO4Np7kQulpF/1hCqn5OcJSAkJJwZX81SvBHp 4COz48A5t4m40IrhviM1IIIrUKMte7IhYgsCQFiblXcpDw5MgWsP8tPE1bDv2kLq 5dAM8ysO8R9uBb/oQ1EjYvr+r7sPldKz+77Ai755O8mcnmL8awy22i+PY10CQDPD OlK4yEPU1vu7qZX9Izt9D1KSoKTgevAl8pX1NUS+cZgGcj3Y+b20gBfpv3w2fcl4 ir/a5WUTZkTPaUNAukkCQBN4K89b/Br9vC3hLi62s/eJf8P1ARU8OVBeIYxLXIja q0G68QgRkg7NrHiFM/DMbm6Sd+4j0IdFR0z8Z1ppWHM= -----END RSA PRIVATE KEY----- IMAP-Admin-1.6.8/Changes0000644000175000017500000001551611244311643013232 0ustar ericericRevision history for Perl extension IMAP::Admin. 0.5 Thu Dec 17 12:29:49 1998 - original version; created by h2xs 1.18 0.7.0 Thu Mar 03 03:46:18 1999 - added capabilites checking and enhanced test procedure 0.8.0 Fri Mar 11 whenver 1999 - changed get_quota and get_acl interfaces to have output that can be given as input to respective sets - updated documentation 0.8.1 don't remember - doc and bug fixing 0.8.2 Thu Mar 18 16:40:02 1999 - fix to list command, bug/patch submitted by Alex Perel - fix in test bug/patch submitted by Alex Perel 0.8.3 don't remember - add quota command as per someone's suggestion and code sample I lost the original message so I apologize for not being able to give proper credit to this person 0.9.0 Sat Oct 16 10:46:16 1999 - added optional partition argument to the create command by request from Martti Kuparinen 1.0.0 Mon Nov 22 18:15:18 1999 - fixed list subroutine, better support for spaces in folder names, bug/patch submitted by Paul Kranenburg - fixed test.pl to hide the password, apologies to the person who sent this bug/patch 1.0.1 Don't remember 1.2.0 Thu Mar 02 11:24:13 2000 - applied quoting fixes from mah@everybody.org this seems to have gotten rid of the lingering issues with having spaces and other such characters in folder names (thanks also for the cruft fixes :) - cleaned up code and documentation - added quota test 1.2.1 Thu Mar 02 12:04:13 2000 - added none option to set_quota to set the quota to none 1.2.2 Sun Mar 12 21:16:38 2000 - Added a license line for the debian folks, This module is distributed under the Artistic license which is now included in the module package (its the same as the perl license) If you do use this is a product just drop me a line and let me know, curiosity kills my cat. 1.2.5 Thu Jun 22 08:03:04 2000 - bug fix for delete mailboxes with spaces from patrick@secureops.com - above bug fix made me look at other mailbox issues so getacl is also fixed with regards to mailboxes with spaces 1.3.0 Tue Aug 22 20:39:34 2000 - typo fix (left out tilde in get_quota_root) thanks to Paul Wiechman and Alain Turbide - a previous fix seems to have broken some things with cyrus users so hopefully this fixes my fix 1.3.5 Thu Sep 28 17:09:02 2000 - added subscribe/unsubscribe at the request of the applications group of Universal Talkware (apparently makes mozilla e-mail happier) 1.3.7 Fri Oct 13 00:21:11 2000 - added rename at the request of Thomas Bolioli - added h_delete (hiearchical delete) because I like just being able to specify the mailbox and have all the sub-mailboxes go away as well (be careful with this as it does do a wild card list) - added new option to the new function 'Separator', set this to the hiearchical separator your server uses (defaults to period) this is needed by h_delete 1.3.8 Wed Oct 25 11:50:49 2000 - fixed a 'bug' in list for servers that don't quote mailboxes that have spaces in folder names - fixed a bug in test that I introduced in 1.3.7 1.4.0 Thu Oct 26 11:59:56 2000 - added SSL support via IO::Socket::SSL (optional new function). imap::admin doesn't attempt to load IO::Socket::SSL until you specify that you want to use ssl (so if you don't have it installed on your box it shouldn't make a difference) - rearranged code so croaks do not happen for connection issues, instead you get an error from initialize code when you try to do a command. (This is to help all of those people using this in cgi scripts) - in supporting ssl I had to switch to sysreads, so now all reads are handled by _read (still doesn't select, but getting closer) - currently it doesn't check for ssl capability (rfc2595 compliance), but maybe in the future 1.4.1 Thu Oct 26 13:35:17 2000 - bug fix (thanks to Thomas Bolioli) for single quotes in a mailbox name 1.4.2 Thu Nov 9 22:31:08 2000 - rearranged new/initialize (no functionality change) - added error subroutine to return error condition 1.4.3 Tue Nov 28 07:50:56 2000 - bug report/fix (thanks to Marc Groot Koerkamp) get_acl had problems with spaces in mailbox names (my forever bug) - bug report/fix (again thanks to Marc) delete was calling incorrect read function 1.5.0 Thu Aug 2 12:50:21 CDT 2001 - re-formatted to make vi friendly (I use emacs and vi, but mostly emacs) added these lines to my .emacs to keep it friendly (custom-set-variables '(perl-indent-level 2) '(perl-continued-statement-offset 2) '(perl-continued-brace-offset 0) '(indent-tabs-mode nil) '(tab-width 2)) basically sets the indent level to 2 and converts tabs to spaces of course this will hose some diffs (unless you ignore whitespace diffs) - bug report/fix (thanks to Lupe Christoph) some older perls don't support (?{ code }), so get_acl splitting expression was re-vamped. - removed use IO::Socket::INET (again some older perls) - removed Text::Parsewords dependency (wasn't using it anymore anyway) 1.5.1 Thu Aug 2 14:43:27 CDT 2001 - bug report/fix (thanks to Paul Kranenburg) in get_quotaroot, removes extraneous line 1.6.0 Sun Nov 4 10:19:44 CST 2001 - bug report/fix (thanks to Dylan Martin and Alain Turbide) for the botch I made of the get_quotaroot fix I made in 1.5.1 - bug report () motd's weren't handled, I put some code in that doesn't break the current, but is also untested against motd's (feedback anyone?) - added CRAM-MD5 support as an authentication method, send it in the new call 0 off, 1 on, 2 on with LOGIN fallback, this also adds the requirement of Digest::MD5, Digest::HMAC, MIME::Base64 if you use this option 1.6.1 Thu Dec 27 08:40:20 CST 2001 - bug report/fix (thanks to Arkadi Shishlov and Oleg Gawrilof) for CRAM setting being uninitialized before use for the default case. - added error condition for CRAM capability, cram use wanted without fallback, but cram not available 1.6.2 Sun Jan 30 10:33:50 CST 2005 - bug report from Francesco Gennai, get_quota and get_quotaroot improperly handling folders/mailboxes with spaces patched both with a regex to handle the data extraction, should work now. 1.6.3 Sun Jan 30 20:53:22 CST 2005 - arrg, I fixed get_quotaroot incorrectly and didn't test it. It should have used the same regex as get_quota instead of what I did. Thanks Franscesco for pointing out the error (again). 1.6.4 Wed Feb 16 07:43:28 CST 2005 - I screwed the pooch on 1.6.3, blatant typo pointed out to me by matrix200 guess I forgot to run make test before releasing. 1.6.5 apparently a mystery release 1.6.6 Sun Sep 07 10:20:22 CST 2008 - Thomas Jarosch sent a patch that adds unix socket support for those who have their admin restricted to unix socket instead of tcp 1.6.7 Sun Aug 23 14:05:04 CST 2009 - David Mayo sent a patch that adds partition support for the rename function IMAP-Admin-1.6.8/test.pl0000644000175000017500000001160512677542320013257 0ustar ericeric# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..13\n"; } END {print "not ok 1\n" unless $loaded;} use IMAP::Admin; $loaded = 1; print "ok 1\n"; ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): $testuser = "user.testjoebob"; $renameuser = "user.renamedjoebob"; print "Remaining tests require a connection an imap server\n"; print "Please enter the server and the admin user and password at the prompts\n"; print "Enter server: "; chomp($server = <>); print "Enter login: "; chomp($login = <>); system "stty -echo"; print "Enter password: "; chomp($password = <>); print "\n"; system "stty echo"; print "Test using SSL(y/n)? "; chomp($ssl = <>); print "Test using CRAM(y/n)? "; chomp($cram = <>); if ($cram eq "y") { $cram = 1; } else { $cram = 0; } if ($ssl ne "n") { print "Enter Port#: "; chomp($port = <>); $imap = IMAP::Admin->new('Server' => $server, 'Port' => $port, 'SSL' => 1, 'SSL_ca_file' => "certs/ca-cert.pem", 'Login' => $login, 'Password' => $password,); } else { $imap = IMAP::Admin->new('Server' => $server, 'CRAM' => $cram, 'Login' => $login, 'Password' => $password); } if ($imap->error ne "No Errors") { print $imap->error, "\n"; exit 0; } for ($err = $imap->create($testuser); $err != 0; $err = $imap->create($testuser)) { print <); } print "ok 2\n"; undef @list; @list = $imap->list($testuser); if (@list) { print "ok 3: found [@list]\n"; } else { print "not ok 3: $imap->{'Error'}\n"; } if ($imap->{'Capability'} =~ /QUOTA/) { print "\nnote: your IMAP server supports QUOTA, going to try and see if I can use them\n"; $err = $imap->set_quota($testuser, 10000); if ($err == 0) { print "ok 4\n"; } else { print "not ok 4: $imap->{'Error'}\n"; } undef @quota; @quota = $imap->get_quota($testuser); if (@quota) { print "ok 5: quota was set (@quota)\n"; $err = $imap->set_quota($testuser, "none"); if ($err == 0) { print "ok 6: set quota to none\n"; } else { print "not ok 6: couldn't set quota to none\n"; } } else { print "not ok 5 (skipping 6): quota set failed : $imap->{'Error'}\n"; } } else { print "skipping tests 4-6, your IMAP server doesn't support QUOTA\n"; } if ($imap->{'Capability'} =~ /ACL/) { print "\nnote: your IMAP server supports ACL, setting delete permission\n"; $err = $imap->set_acl($testuser, $login, "cd"); # create/delete if ($err != 0) { print "not ok 7: $imap->{'Error'}\n"; } else { undef @acl; @acl = $imap->get_acl($testuser); if (!(@acl)) { print "not ok 7: $imap->{'Error'}\n"; } else { print "ok 7: acl string [@acl]\n"; } } } else { print "skipping test 7, your IMAP server doesn't support ACL\n"; } $err = $imap->delete($testuser); if ($err == 0) { print "ok 8\n"; } else { print "not ok 8: $imap->{'Error'}\n"; } $err = $imap->create($testuser, "default"); if ($err == 0) { print "ok 9 : test user created with optional partition set to default\n"; if ($imap->{'Capability'} =~ /ACL/) { $err = $imap->set_acl($testuser, $login, "cd"); } } else { print "not ok 9: test user with optional partition argument failed, this might not be a problem : $imap->{'Error'}\n"; } $subf = $testuser.".sub folder"; $err = $imap->create($subf); if ($err == 0) { print "ok 10 : created sub folder (sub folder) for $testuser\n"; if ($imap->{'Capability'} =~ /ACL/) { $err = $imap->set_acl($subf, $login, "cd"); undef @acl; @acl = $imap->get_acl($subf); if (!(@acl)) { print "test 10 acl failed $imap->{'Error'}\n"; } else { print " test 10 acl string [@acl] <- should match test 7\n"; } } } else { print "not ok 10 : $imap->{'Error'}\n"; } $what = $testuser.'.*'; undef @list; @list = $imap->list($what); if (!(@list)) { print "not ok 11 : sub folder wasn't really created\n"; } else { if ($list[0] eq $subf) { print "ok 11\n"; } else { print "not ok 11 : something was created (in 10) but didn't get reported correctly [@list]\n"; } } $err = $imap->h_delete($testuser); if ($err == 0) { print "ok 12: hiearchically deleted $testuser\n"; } else { print "not ok 12: hiearchical delete failed -- $imap->{'Error'}\n"; } undef @list; @list = $imap->list($testuser); if (!(@list)) { print "ok 13: $imap->{'Error'}\n"; } else { print "not ok 13: found [@list]\n"; } $imap->close; IMAP-Admin-1.6.8/Makefile.PL0000644000175000017500000000035311244310754013704 0ustar ericericuse ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'IMAP::Admin', 'VERSION_FROM' => 'Admin.pm', # finds $VERSION ); IMAP-Admin-1.6.8/META.json0000644000175000017500000000143012677543071013363 0ustar ericeric{ "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "IMAP-Admin", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : {} } }, "release_status" : "stable", "version" : "v1.6.8" }