Mael Regnery

NAME

Barracuda::Api - Easy way to communicate with Barracuda API version 4.x and above

SYNOPSIS

    use Barracuda::Api

    my $bar = Barracuda::Api->new(
        {
            domain => 'mydomain.com',
            password => 'myp@ssword'
        }
    );

DESCRIPTION

This module gives few method to play with Barracuda API version 4.x and above.

A better documentation of Barracuda API can be found at https://techlib.barracuda.com/BSF/APIGuide

ATTRIBUTES

domain - domain to your Barracuda API
password - password API
port - optional port to your Barracuda API (Default : 8000)
proto - optional protocol to your Barracuda API (default : http)
verbose - optional verbose level : 0, 1 (default : 0)

METHODS

new( $ref )

The constructor take a reference to hash. See the ATTRIBUTES section to get all parameters.

listAllDomain()

Method to list all domain.

It return a scalar with XMLRPC answer (formatted or not).

getDestinationAddress( $domain )

Method to get the destination host for $domain.

It return a scalar with XMLRPC answer (formatted or not).

createDomain( $domain, $destination )

Method to create domain $domain with destination $destination.

It return a scalar with XMLRPC answer (formatted or not).

deleteDomain( $domain )

Method to delete domain $domain.

It return a scalar with XMLRPC answer (formatted or not).

createUser( $user )

Method to create user $user.

It return a scalar with XMLRPC answer (formatted or not).

deleteUser( $user )

Method to delete user $user.

It return a scalar with XMLRPC answer (formatted or not).

whitelistSenderForDomain( $domain, $whitelist, $comment )

Method to whitelist $whitelist for specific domain $domain and optionally add a comment $comment.

It return a scalar with XMLRPC answer (formatted or not).

blacklistSenderForDomain( $domain, $blacklist, $comment )

Same as whitelist method, but blacklist $blacklist.

It return a scalar with XMLRPC answer (formatted or not).

AUTHOR

Mael Regnery <mael@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2016, <Mael Regnery>.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.