NAME

Net::ManageSieve::Siesh - Expanding ManagieSieve beyond the Protocol

VERSION

Version 0.05

SYNOPSIS

Net::ManageSieve::Siesh expands Net::ManagieSieve beyond just implementing the core RFC protocol. There are functions to upload and download files, deactivating scripts, copy and move them etc.

use Net::ManageSieve::Siesh;

my $sieve = Net::ManageSieve::Siesh->new();
$sieve->copy('script1','script2');
$sieve->mv('script2','script3');
$sieve->put('../script.txt','script4');
$sieve->get('script1','../script.txt');

If you're just searching for a comamnd line interface to ManageSieve, please take a look at siesh(1).

METHODS

deactivate()

Deactivates all active scripts on the server. This has the same effect as using the function setactive with an empty string as argument.

movescript($oldscriptname,$newscriptname)

Renames the script. This functions is equivalent to copying a script and then deleting the source script.

copyscript($oldscriptname,$newscriptname)

Copy the script $oldscriptname to $newscriptname.

temp_scriptfile($scriptname,$create)

Calls tempfile from File::Temp and writes the content of $scriptname into the returned file. Returns the opened filehandle and the filename. Unless $create is true, return undef if the requested script does not exist.

putfile($file,$scriptname)

Uploads $file with the name $scriptname to the server.

getfile($scriptname,$file)

Downloads the script names <$scriptname> to the file specified by $file.

listscripts()

Returns a list of scripts and the active script. This function overwrites listscripts provided by Net::ManageSieve in order to return a more sane data structure. It returns a reference to an array, that holds all scripts, and a scalar with the name of the active script in list context and just the array reference in scalar context. =item error()

Returns $@ or $! of a previous failed method. Please notice, that this method overwrites the method of the same name in Net::ManageSieve and just returns the error mesage itself.

AUTHOR

Mario Domgoergen, <mario at domgoergen.com>

BUGS

Please report any bugs or feature requests to bug-app-siesh at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Siesh. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SEE ALSO

siesh(1)

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::ManageSieve::Siesh

You can also look for information at:

L<http://www.math.uni-bonn.de/~dom/siesh/>

COPYRIGHT & LICENSE

Copyright 2008 Mario Domgoergen, all rights reserved.

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