IMAP::Admin

Description

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"); %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 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. Its interface should, in theory, work with any RFC compliant IMAP server, but I currently have only tested it against Carnegie Mellon Universitys Cyrus IMAP and Mirapoints 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 (youll 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 shouldnt strictly be necessary as clients that are RFC2595 compliant can issue a STARTTLS to initiate the secure layer, but currently IMAP::Admin doesnt 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.

Ssl - Imapadmin - Cram - Imap Server - Perl Module - By Default - Server - Err - Ca - Default - Key - Acl - Libraries - Programming

Published By:Eric Estabrooks

License Type:Freeware

Date Added:22 October, 2010

Version:1.6.4

Price:Free

Downloads:39

Size:14.3 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

Wsh, "Web Shell" is a remote UNIX/WIN shell, that works via HTTP/HTTPS.

DateOct 13, 2010

AuthorAlex Dyatlov

Size24.6 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Internet

Apache-SSL package offers SSL extensions for Apache. Apache-SSL is a secure Webserver, based on Apache and SSLeay/OpenSSL.

DateOct 11, 2010

AuthorBen Laurie and Adam Laurie

Size57.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Internet

Lemonldap::Portal::Sslsso is a Perl extension for the Lemonldap SSO system.

DateAug 11, 2010

AuthorEric German & Xavier Guimard

Size5.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Fortify provides full strength, 128-bit encryption facilities to the export editions of Netscape Navigator and Communicator. If you routinely use Netscapes export-grade web browsers, (i.e.

DateSep 28, 2010

AuthorEric Young

Size430.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Internet

mod_urlscheme is an Apache 1.3/2.0/2.2 module that allows the Apache configuration author control over the scheme to use when constructing self-referential URLs.

DateSep 11, 2010

AuthorErnst Jan Plugge

Size14.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Internet