Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    IMAP::Admin 1.6.7

    Download button

    No screenshots available
    Downloads: 462  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Eric Estabrooks | More programs
    Perl Artistic License / FREE
    August 24th, 2009, 07:27 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    IMAP::Admin description

    IMAP::Admin is a Perl module for basic IMAP server administration.

    IMAP::Admin is a Perl module for basic IMAP server administration.

    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");

    @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");
    �l = $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

    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).

    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

    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · Minor feature enhancements

      


    TAGS:

    IMAP server | server administration | Perl module | IMAP::Admin | IMAP | server

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM