Skip to content

Instantly share code, notes, and snippets.

@lucas1
Last active March 21, 2022 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucas1/099b56cebfb69dcee819f04f5833d737 to your computer and use it in GitHub Desktop.
Save lucas1/099b56cebfb69dcee819f04f5833d737 to your computer and use it in GitHub Desktop.

NAME

iRedAdmin - API interface to the panel iRedMail (http://www.iredmail.org)

VERSION

Version 0.01

SYNOPSIS

use iRedAdmin;
 
my $iredadmin = iRedAdmin->new(
    url => 'https://hostname.mydomain.com/iredadmin',
    username => 'postmaster@mydomain.com',
    password => 'your_password',
    cookie => '/home/user/cookie.txt',
    lang => 3
);

ATTRIBUTES

url

set url of panel iRedAdmin, example: 'https://hostname.mydomain.com/iredadmin'.

username

set username your account of panel.

password

set password your account of panel.

set path of file cookie, is optional but always will do login in panel and will be more slow.

lang

set language in access, return error in language selected, list:

1 or cs_CZ to Čeština

2 or de_DE to Deutsch (Deutsch)

3 or en_US to English (US) # is default

4 or es_ES to Español

5 or fi_FI to Finnish (Suomi)

6 or fr_FR to Français

7 or hu_HU to Hungarian

8 or it_IT to Italiano

9 or ko_KR to Korean

10 or nl_NL to Netherlands

11 or pl_PL to Polski

12 or pt_BR to Portuguese (Brazilian)

13 or ru_RU to Ру��кий

14 or sl_SI to Slovenian

15 or zh_CN to 简体中文

16 or zh_TW to �體中文

error

get message error when methods return 0.

METHODS

Admin

get reference of instance Admin, see in Lucas for read document.

my $admin = $iredadmin->Admin;

Domain

get reference of instance Domain, see in iRedAdmin::Domain for read document.

my $domain = $iredadmin->Domain;

User

get reference of instance User, see in iRedAdmin::User for read document.

my $user = $iredadmin->User;

Logout

logout user current.

AUTHOR

Lucas Tiago de Moraes, <lucastiagodemoraes@gmail.com>

COPYRIGHT AND LICENSE

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment