NAME

Mail::Barracuda::API - Manage Barracuda Antispam Appliance

SYNOPSIS

  use Mail::Barracuda::API;
  my $api = Mail::Barracuda::API->new(
  	server => 'mybarracuda.mydomain.com',
	port => 8000,
	api_key => 'my API key',
  );
  $api->domainAdd(domain => 'example.com', mailhost=> 'mail.example.com');
  $api->domainRemove(domain => 'example.com');

DESCRIPTION

This module provides a Perl interface to parts of the Barracuda Antispam Appliance API

Methods

new

my $api = Mail::Barracuda::API->new(
	server => 'http://mybarracuda.mydomain.com',
	port => 8000,
	api_key => 'my API key',
);

Sets up a Mail::Barracuda::API session. Port defaults to 8000. All other parameters are necessary..

userChange

my $response = $api->userChange(
	email => 'jane@example.com',
	var => 'user_password', 
	val=> '4321',
);

Sets property user_password on account jane@example.com to 4321. See API manual for other valid vars. $response is a 0 if successful and a 1 if a error occured.

domainAdd

my $response = $api->domainAdd(
	domain => 'example.com', 
	mailhost => 'mail.example.com',
);

Sets up a domain on the Barracuda Appliance. $response is a 0 if successful and a 1 if a error occured.

domainRemove

my $response = $api->domainRemove(domain => 'example.com');

Removes a domain from the Barracuda Appliance. $response is a 0 if successful and a 1 if a error occured.

userAdd

my $response = $api->userAdd(
	email => 'jane@example.com', 
	paassword => '12345',
};

Adds a quarantine and personal settings login for the email address provided. $response is a 0 if successful and a 1 if a error occured.

userRemove

my $response = $api->userRemove(email => 'jane@example.com');

Removes the user from quarantine and personal settings from the Appliance. $response is a 0 if successful and a 1 if a error occured.

SEE ALSO

Barracuda API For 3.x firmware.

http://www.barracudanetworks.com/ns/downloads/BarracudaAPI-v3x.pdf

AUTHOR

Jonathan Auer, <jda@tapodi.net>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Jonathan Auer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.