Net::APP - Critical Path Account Provisioning Protocol
use Net::APP;
#constructor
$app = new Net::APP ( 'host:port',
User => $user,
Domain => $domain,
Password => $password,
Timeout => 60,
Debug => 1,
) or die $@;
#commands
$app->ver( 'ver' => $Net::APP::APP_VERSION );
$app->login ( User => $user,
Domain => $domain,
Password => $password,
);
$app->create_domain ( Domain => $domain ); $app->delete_domain ( Domain => $domain ); #etc. (see the Account Provisioning Protocol Developer's Guide, section 3.3)
#command status $message = $app->message; $code = $app->code; $bool = $app->ok();
#destructor $app->close();
This module implements a client interface to Critical Path's Account Provisioning Protocol, enabling a perl application to talk to APP servers. This documentation assumes that you are familiar with the APP protocol documented in the Account Provisioning Protocol Developer's Guide.
A new Net::APP object must be created with the new method. Once this has been done, all APP commands are accessed via method calls on the object.
HOST and PORT
specify the host and port to connect to in cleartext. Typically this
connection is proxied via Safe Passage Secure Tunnel or Stunnel
http://www.stunnel.org/ using a command such as:
stunnel -P none -c -d 8888 -r your.cp.address.and:port
This method will connect to the APP server and execute the ver method.
OPTIONS are passed in a hash like fastion, using key and value pairs. Possible options are:
Timeout - Set a timeout value (defaults to 120)
Debug - Enable debugging information (see the debug method in the Net::Cmd manpage)
User, Domain, Password - if these exist, the new method will also execute the login method automatically.
If the constructor fails undef will be returned and an error message will be in $@.
Unless noted below, all commands return a reference to a list containing the lines of the reponse, or undef upon failure. The first line is parsed for the status code and message. You can check the status code and message using the normal Net::Cmd message, code, ok, and status methods.
Some methods return additional response information, such as get_num_domain_mailboxes, get_domain_mailboxes, get_mailbox_availability and get_mailbox_status methods currently return any additional response information. Unless specifically noted below, no attempt is (yet) made to parse this data.
These methods are not intended to be called by the user.
These subroutines are not intended to be called by the user.
Ivan Kohler <ivan-netapp_pod@420.am>.
This module is not sponsored or endorsed by Critical Path.
Copyright (c) 2001 Ivan Kohler. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This module currently implements APP v3.3, as documented in the Account Provisioning Protocol Developers Guide v3.3.
The Account Provisioning Protocol Developer's Guide is not publicly available.
It appears that Safe Passage Secure Tunnel and Stunnel establish standard SSL connections. It should be possible to use Net::SSLeay and connect to the APP server directly. Initial prototyping with IO::Socket::SSL was not promising. :(
The get_num_domain_mailboxes, get_mailbox_availability and get_mailbox_status methods currently return response information. No attempt is (yet) made to parse this data.
Critical Path <http://www.cp.net/>, APP documentation <http://support.cp.net/products/email_messaging/documentation/index.jsp>, Safe Passage Secure Tunnel <http://www.int.c2.net/external/?link=spst/index.php3>, Stunnel <http://www.stunnel.org>, the IO::Socket manpage, the Net::Cmd manpage, perl(1).