NAME
WebService::MIAB - manage emails (users) and alias addresses on a mail-in-a-box server
VERSION
version 0.03
SYNOPSIS
use WebService::MIAB;
my $miab = WebService::MIAB->new(
username => 'adminuser@domain.com',
pass => 'adminpasswd',
host => 'domain.com',
);
my $users = $miab->get_users();
my $result = $miab>create_user({
email => 'bart.simpson@domain.com',
password => 'EatMyShorts',
});
DESCRIPTION
WebService::MIAB is a Perl module that manages user and alias addresses on a Mail-in-a-box (MIAB) server.
You can list, create and remove user and alias addresses.
The API methods to the DNS system of MIAB is not implemented, yet. Patches are welcome.
METHODES
User methods
The user methods are to handle plain email adresses on a MIAB server. Each email address is a user and has (limited) access to the MIAB server.
get_users
Returns all defined users in JSON format.
my $users = $miab->get_users();
create_user
Creates a new user account. Expects the email address and the password in the parameter hash. Returns the answer from the webservice.
my $result = $miab->create_user({
email => 'bart.simpson@springfield.com',
password => 'EatMyShorts'
});
remove_user
Removes the email user account. Expects the email address in the parameter hash. Returns the answer from the webservice.
my result = $miab->remove_user({
email => bart.simpson@springfield.com
});
find_user
Returns a list of users records matching its forward_to record to the given email_pattern and domain_pattern. The pattern can be a string that is evaluated to a regexp or a regexp.
my @users = $miab->find_user('email_pattern', qr/example.com/)
Alias methods
get_aliases
Returns all aliases in JSON format.
my $aliases = $miab->get_aliases();
get_domains
Returns a list of all domains used in alias adresses.
my @domains = $miab->get_domains();
find_forward_to_aliases
Returns a list of alias records matching its forward_to record to the given alias_pattern and domain_pattern. The pattern can be a string that is evaluated to a regexp or a regexp.
my @aliases = $miab->find_forward_to_aliases('alias_pattern', qr/example.com/);
find_permitted_sender_aliases
Returns a list of alias records matching its permitted_sender record to the given alias_pattern and domain_pattern. The pattern can be a string that is evaluated to a regexp or a regexp.
my @aliases = $miab->find_permitted_sender_aliases('alias_pattern', qr/example.com/);
find_aliases
Returns a list of alias records matching its address record the given alias_pattern and domain_pattern. The pattern can be a string that is evaluated to a regexp or a regexp.
my @aliases = $miab->find_aliases('alias_pattern', qr/example.com/);
create_alias
Creates a new alias address.
$miab->create_alias({
address => 'bart.simpson@springfield.com',
forwards_to => ['lisa.simpson@springfield.com','Maggie.simpson@springfield.com'],
permitted_senders => ['Homer.simpson@springfield.com','Marge.simpson@springfield.com'],
});
remove_alias
Permanently deletes an alias address.
$miab->remove_alias({
address => bart.simpson@springfield.com
});
BUGS
Please report any bugs or feature requests to bug-webservice-miab at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-MIAB. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WebService::MIAB
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
AUTHORS
Alexander Scneider alexander.schneider@minati.de
, Mario Minati mario.minati@minati.de
.
Currently maintained by Alexander Scneider alexander.schneider@minati.de
LICENSE AND COPYRIGHT
Copyright 2018 Alexander Scneider alexander.schneider@minati.de
, Mario Minati mario.minati@minati.de
.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.