Friday, April 1, 2011

The AdminClient Protocol

IndiMail provides close to around 300 different programs as part of a flexible Enterprise Messaging Platform. You can carry administer the entire platform with around 45 of these programs. A program called indisrvr(8) provides a way for users to secure execute these commands from any remote location. To execute these programs, you need to have an admin account on the IndiMail server. These accounts can be created by the mgmtpass(8) program. Once you have an admin account on the IndiMail server, you can further restrict users to certain programs using the vpriv(8) program. vpriv can further modify privileges by allowing only certain options within a allowed program.

To execute these programs on the IndiMail server, you need to connect to port 4000 and use the adminclient protocol. The adminclient protocol is described below by showing a conversation between a client and the server 'indisrvr'

s - denotes server
c - denotes client

        s: "Login: "
        c: "userid\n"
        s: "Password: "
        c: "password\n"
        s: "OK\n"
        c: "index command arg1 arg2 ...\n"
        c: "\n"
        s: "RETURNSTATUS[return value of command]\n"

To execute 'vuserinfo' you will need to do the following.

        % telnet 0 4000
        Connected to 0.
        Escape character is '^]'.
        Login: admin
        Password: benhur20
        7 vuserinfo -n
        name          :

Index value of '7' was used for vuserinfo. A privileged user 'admin' with password 'benhur20' was used to execute vuserinfo. Each command has an index. The values are given as below.

Index Commands
----- --------
00    vadduser
01    vpasswd
02    vdeluser
03    vsetuserquota
04    vbulletin
05    vmoduser
06    valias
07    vuserinfo
08    vipmap
09    vacation
10    vmoveuser
11    vrenameuser
12    crc
13    vcfilter
14    indiversion
15    vsmtp
16    dbinfo
17    vhostid
18    mgmtpass
19    inquerytest
20    printdir
21    shit
22    vaddaliasdomain
23    vadddomain
24    vcalias
26    vconvert
27    vdeldomain
28    vrenamedomain
29    vdominfo
30    vfstab
31    vgroup
32    vatrn
33    vpriv
34    vlimit
35    hostcntrl
36    execmysql
37    updatefile
38    vreorg
39    vdeloldusers
40    ipchange
41    svctool
42    clearopensmtp
43    hostsync
44    inquerytest
45    vmoddomain

If you have a user provisioning interface written in your favourite language, you can connect to the port 4000 and execute the above programs. IndiMail also provides you a command line program 'adminclient' which can execute any of the above programs. Read the man page for adminclient for further details.

No comments:

IndiMail Queue Mechanism

Indimail has the ability of configuring multiple local and remote queues. A queue is a location on your hard disk where email are deposited ...