File sendcommand.8 of Package citadel

." Text automatically generated by txt2man
.TH sendcommand 8 "Mai 15, 2011" "Sendcommand Utility" "7.86-0"
.SH NAME
\fBsendcommand \fP- Sendcommand Utility
.SH SYNOPSIS
.nf
.fam C
\fBsendcommand\fP [\fB-w\fP <integer>] \fIcommand\fP
.fam T
.fi
.SH DESCRIPTION
Sendcommand connects to the given citserver, identifies itself as
an internal program, and sends the specified Citadel Protocol
Command. 
.SH OPTIONS
.TP
.B
\fB-w\fP <integer>
Change the default watchdog timeout. Takes an
integer argument, e.g. \fB-w\fP 50 will set the watchdog
to 50 seconds
.TP
.B
\fIcommand\fP
see below and
http://www.citadel.org/doku.php/documentation:appproto:start
for more details.
.SH COMMANDS
This list of commands is not complete. It lists only the
commands which may be useful to administrate the server.
.PP
-- miscellaneous commands
.TP
.B
NOOP
NO OPeration. This \fIcommand\fP does nothing. It takes no
arguments and always returns OK. It might be used as 
a "keep alive" \fIcommand\fP to prevent the server from timing out,
if it's running over a transport that needs this type of thing.
.TP
.B
ECHO
ECHO something. This \fIcommand\fP also does nothing. It simply
returns OK followed by whatever its arguments are.
.TP
.B
TIME
get server local TIME. TIME returns OK followed by the
current time measured in seconds since 00:00:00 GMT, Jan 1,
1970 (standard Unix format).
.TP
.B
MRTG
Multi Router Traffic Grapher. MRTG is a tool which creates
pretty graphs of network activity. The MRTG \fIcommand\fP can output
Citadel server activity in the format MRTG expects.
This format is as follows:
.RS
.PP
LISTING_FOLLOWS
.TP
.B
Line 1
variable #1
.TP
.B
Line 2
variable #2
.TP
.B
Line 3
uptime of system
.TP
.B
Line 4
name of system
.PP
000
.PP
MRTG accepts two different keywords. "MRTG users" will return
two variables, the number of connected users and the number of
active users. "MRTG messages" will return one variable (and a
zero in the second field), showing the current highest message
number on the system. Any other keyword, or a missing keyword,
will cause the MRTG \fIcommand\fP to return an ERROR code.
.RE
.TP
.B
QUIT
QUIT. Terminate the server connection. This \fIcommand\fP takes
no arguments. It returns OK and closes the connection immediately.
.TP
.B
TERM
TERMinate another session. The \fIcommand\fP should be called with
a single argument: the session ID (obtained from an RWHO \fIcommand\fP)
of the session to be terminated.
.RS
.PP
TERM returns OK if the session was terminated, or ERROR otherwise.
Note that a client program is prohibited from terminating the
session it is currently running on.
.RE
.TP
.B
REQT
REQuest client Termination. The REQT \fIcommand\fP accepts one
parameter: the session ID of the client which should be
terminated, or 0 for all clients. When successful, the REQT
\fIcommand\fP returns OK. The effects of the REQT \fIcommand\fP should be
considered advisory only. The recommended implementation
practice is to first issue a REQT \fIcommand\fP, then wait a little
while (from 30 seconds up to a few minutes) for well-behaved
clients to voluntarily terminate, and then issue a TERM \fIcommand\fP
to forcibly disconnect the client.
.TP
.B
STLS
Start Transport Layer Security. This \fIcommand\fP starts TLS on
the current connection. The current implementation uses OpenSSL
on both the client and server end. For future compatibility all
clients must support at least TLSv1, and servers are guaranteed
to support TLSv1. During TLS negotiation (see below) the server
and client may agree to use a different protocol.
.RS
.PP
The server returns ERROR if it does not support SSL or SSL
initialization failed on the server; otherwise it returns OK.
Once the server returns OK and the client has read the response,
the server and client immediately negotiate TLS (in OpenSSL,
using \fBSSL_connect\fP() on the client and \fBSSL_accept\fP() on the
server). If negotiation fails, the server and client should
attempt to resume the session unencrypted. If either end is
unable to resume the session, the connection should be closed.
.PP
This \fIcommand\fP may be run at any time.
.RE
.TP
.B
GTLS
Get Transport Layer Security Status. This \fIcommand\fP returns
information about the current connection. The server returns
OK plus several parameters if the connection is encrypted, and
ERROR if the connection is not encrypted. It is primarily used
for debugging. The \fIcommand\fP may be run at any time.
.RS
.TP
.B
0
Protocol name, e.g. "SSLv3"
.TP
.B
1
Cipher suite name, e.g. "ADH-RC4-MD5"
.TP
.B
2
Cipher strength bits, e.g. 128
.TP
.B
3
Cipher strength bits actually in use, e.g. 128
.RE
.PP
-- List commands
.TP
.B
RWHO
Read WHO's online. Displays a list of all users connected to
the server. No error codes are ever returned. LISTING_FOLLOWS
will be returned, followed by zero or more lines containing the
following twelve fields:
.RS
.TP
.B
0
Session ID. Citadel fills this with the pid of a server program.
.TP
.B
1
User name.
.TP
.B
2
The name of the room the user is currently in. This field might
not be displayed (for example, if the user is in a private room)
or it might contain other information (such as the name of a
file the user is downloading).
.TP
.B
3
(server v4.03 and above) The name of the host the client is
connecting from, or "localhost" if the client is local.
.TP
.B
4
(server v4.04 and above) Description of the client software being used
.TP
.B
5
The last time, locally to the server, that a \fIcommand\fP was
received from this client (Note: NOOP's don't count)
.TP
.B
6
The last \fIcommand\fP received from a client. (NOOP's don't count)
.TP
.B
7
Session flags. These are: + (spoofed address), -
(STEALTH mode), * (posting) and . (idle).
.TP
.B
8
Actual user name, if user name is masqueraded and viewer is an Aide.
.TP
.B
9
Actual room name, if room name is masqueraded and viewer is an Aide.
.TP
.B
10
Actual host name, if host name is masqueraded and viewer is an Aide.
.TP
.B
11
Nonzero if the session is a logged-in user, zero otherwise.
.PP
The listing is terminated, as always, with the string "000" on a
line by itself.
.RE
.TP
.B
LPRM
List All Public RooMs. This \fIcommand\fP lists all public rooms,
and nothing else. Result is as follows:
.RS
.PP
-- Columnname | Value
.TP
.B
NAME
Actual name of this room; may include '\' to separate trees
.TP
.B
FLAG
QRFlags of this room
.TP
.B
FLOOR
The floor number its on
.TP
.B
LISTORDER
.TP
.B
ACL
the Access control list
.TP
.B
CURVIEW
currently viewed as..
.TP
.B
DEFVIEW
by default viewet as..
.TP
.B
LASTCHANGE
last write access 
.RE
.TP
.B
LIST
user LISTing. To get a list of users available on your citadel.
It always succeeds, returning LISTING_FOLLOWS followed by zero
or more user records, 000 terminated. The fields on each line
are as follows:
.RS
.TP
.B
*
User display name
.TP
.B
*
Access level
.TP
.B
*
User number
.TP
.B
*
Date/time of last login (Unix timestamp format)
.TP
.B
*
Total number of logins
.TP
.B
*
Total number of messages posted
.TP
.B
*
Password (listed only if the user requesting the list is an Aide)
.PP
Unlisted entries will also be listed to Aides logged into the
server, but not to ordinary users.
.PP
The LIST \fIcommand\fP accepts an optional single argument, which is
a simple, case-insensitive search string. If this argument is
present, only usernames in which the search string is present
will be returned. It is a simple substring search, not a regular
expression search. If this string is empty or not present, all
users will be returned. 
.RE
.TP
.B
WHOK
WHO Knows room. This \fIcommand\fP is available only to Aides.
ERROR + HIGHER_ACCESS_REQUIRED will be returned if the user is
not an Aide. Otherwise, it returns LISTING_FOLLOWS and then
lists, one user per line, every user who has access to the
current room.
.TP
.B
LBIO
List users who have BIOs on file. This \fIcommand\fP is
self-explanatory. Any user who has used EBIO to place a bio on file
is listed. LBIO almost always returns LISTING_FOLLOWS followed by
this listing, unless it experiences an internal error in which case
ERROR is returned.
.PP
-- Floor commands
.TP
.B
LFLR
List all known FLooRs. On systems supporting floors, this \fIcommand\fP
lists all known floors. The \fIcommand\fP accepts no parameters. It will
return ERROR+NOT_LOGGED_IN if no user is logged in. Otherwise it
returns LISTING_FOLLOWS and a list of the available floors, each line
consisting of three fields:
.RS
.TP
.B
*
The floor number associated with the floor
.TP
.B
*
The name of the floor
.TP
.B
*
Reference count (number of rooms on this floor)
.RE
.TP
.B
CFLR
Create a new FLooR. This \fIcommand\fP is used to create a new floor.
It should be passed two arguments: the name of the new floor to be
created, and a 1 or 0 depending on whether the client is
actually creating a floor or merely checking to see if it has
permission to create the floor. 
.RS
.PP
If the \fIcommand\fP succeeds, it will return OK followed by the floor
number associated with the new floor. Otherwise, it will return
ERROR (plus perhaps HIGHER_ACCESS_REQUIRED, ALREADY_EXISTS, or
INVALID_FLOOR_OPERATION) followed by a description of why the
\fIcommand\fP failed.
.RE
.TP
.B
KFLR
Kill a FLooR. This \fIcommand\fP is used to delete a floor. It should
be passed two argument: the number of the floor to be deleted, and
a 1 or 0 depending on whether the client is actually deleting the
floor or merely checking to see if it has permission to delete the
floor. 
.RS
.PP
Floors that contain rooms may not be deleted. If there are rooms on
a floor, they must be either deleted or moved to different floors
first. This implies that the Main Floor (floor 0) can never be
deleted, since Lobby>, Mail>, and Aide> all reside on the Main Floor
and cannot be deleted.
.PP
If the \fIcommand\fP succeeds, it will return OK. Otherwise it will return
ERROR (plus perhaps HIGHER_ACCESS_REQUIRED or INVALID_FLOOR_OPERATION)
followed by a description of why the \fIcommand\fP failed.
.RE
.TP
.B
EFLR
Edit a FLooR. Edit the parameters of a floor. The client may pass
one or more parameters to this \fIcommand\fP:
.RS
.TP
.B
*
The number of the floor to be edited
.TP
.B
*
The desired new name
.PP
More parameters may be added in the future. Any parameters not
passed to the server will remain unchanged. A minimal \fIcommand\fP
would be EFLR and a floor number - which would do nothing. EFLR
plus the floor number plus a floor name would change the floor's
name.
.PP
If the \fIcommand\fP succeeds, it will return OK. Otherwise it will
return ERROR (plus perhaps HIGHER_ACCESS_REQUIRED or
INVALID_FLOOR_OPERATION)
.RE
.PP
-- User related commands
.TP
.B
CREU
CREate new User account. This \fIcommand\fP creates a new user account
AND DOES NOT LOG IT IN. The first argument to this \fIcommand\fP will be
the name of the account. No case conversion is done on the name.
Note that the new account is installed with a default configuration,
and no password. The second argument is optional, and will be an
initial password for the user. This \fIcommand\fP returns OK if the account
was created, ERROR + HIGHER_ACCESS_REQUIRED if the user is not an Aide,
ERROR + USERNAME_REQUIRED if no username was specified, or ERROR +
ALREADY_EXISTS if another user already exists with this name.
.RS
.PP
Please note that CREU is intended to be used for activities in which a
system administrator is creating user accounts. For self-service user
account creation, use the NEWU \fIcommand\fP.
.RE
.TP
.B
VALI
VALIdate user. This \fIcommand\fP is used to validate users. Obviously,
it can only be executed by users with Aide level access. It should be
passed two parameters: the name of the user to validate, and the desired
access level.
.RS
.PP
If the \fIcommand\fP succeeds, OK is returned. The user's access level is
changed and the "need validation" bit is cleared. If the \fIcommand\fP fails
for any reason, ERROR, ERROR+NO_SUCH_USER, or
ERROR+HIGHER_ACCESS_REQUIRED will be returned.
.RE
.TP
.B
QUSR
Query for a USeR. This \fIcommand\fP is used to check to see if a
particular user exists. The only argument to this \fIcommand\fP is the
name of the user being searched for. If the user exists, OK is
returned, along with the name of the user in the userlog (so the
client software can learn the correct upper/lower casing of the
name if necessary). If the user does not exist, ERROR+NO_SUCH_USER
is returned. No login or current room is required to utilize this
\fIcommand\fP.
.TP
.B
AGUP
Administrative Get User Parameters.
.TP
.B
ASUP
Administrative Set User Parameters. These commands are only
executable by Aides and by server extensions running at system-level.
They are used to get/set any and all parameters relating to a user
account. AGUP requires only one argument: the name of the user in
question. ASUP requires all of the parameters to be set. The
parameters are as follows, and are common to both commands:
.RS
.PP
-- No. | Value
.TP
.B
0
User name
.TP
.B
1
Password
.TP
.B
2
Flags (see citadel.h)
.TP
.B
3
Times called
.TP
.B
4
Messages posted
.TP
.B
5
Access level
.TP
.B
6
User number
.TP
.B
7
Timestamp of last call
.TP
.B
8
Purge time (in days) for this user (or 0 to use system default)
.PP
Upon success, AGUP returns OK followed by all these parameters, and
ASUP simply returns OK. If the client has insufficient access to
perform the requested operation, ERROR+HIGHER_ACCESS_REQUIRED is
returned. If the requested user does not exist, ERROR+NO_SUCH_USER
is returned. If 1 to 8 are 0, the user will be scheduled for deletion;
he will be unable to log in or send/receive email; His data will be
removed on the next run of the Autopurger; Until then, you won't be
able to re-create a similar user.
.RE
.TP
.B
RENU
REName a User. Because the Citadel system uses the display name
of a user as the primary database key for the account, changing the
display name requires a separate operation. RENU renames a user.
It must be supplied with two parameters: the old (existing) and
new (desired) user account names. RENU will return one of the
following codes:
.RS
.TP
.B
OK
Operation succeeded; the user has been renamed.
.TP
.B
ERROR+ALREADY_LOGGED_IN
The user cannot be renamed because the
account is currently logged in.
.TP
.B
ERROR+NO_SUCH_USER
The specified user does not exist.
.TP
.B
ERROR+ALREADY_EXISTS
An account with the requested new name already
exists.
.RE
.TP
.B
GNUR
Get Next Unvalidated User. This \fIcommand\fP shows the name of a user
that needs to be validated. If there are no unvalidated users, OK is
returned. Otherwise, MORE_DATA is returned along with the name of
the first unvalidated user the server finds. All of the usual
ERROR codes may be returned as well (for example, if the user is not
an Aide and cannot validate users). A typical "Validate New Users"
\fIcommand\fP would keep executing this \fIcommand\fP, and then validating each
user it returns, until it returns OK when all new users have been
validated.
.PP
-- Change the behaviour of the Citadel System
.TP
.B
IGAB
Initialize Global Address Book. This \fIcommand\fP creates, or
re-creates, a database of Internet e-mail addresses using the
vCard information in the Global Address Book room. This procedure
is normally run internally when the server determines it necessary,
but is also provided as a server \fIcommand\fP to be used as a
troubleshooting/maintenance tool. Only a system Aide can run the
\fIcommand\fP. It returns OK on success or ERROR on failure.
.TP
.B
CONF
get or set global CONFiguration options. Retrieves or sets various
system-wide configuration and policy options. This \fIcommand\fP is only
available to Aides. The sole parameter accepted is a \fIcommand\fP, which
should be either GET or SET. If the GET \fIcommand\fP succeeds, CONF will
return LISTING_FOLLOWS followed by the fields described below, one
line at a time. If the SET \fIcommand\fP succeeds, CONF will return
SEND_LISTING and expect the fields described below, one line at a
time (don't worry about other fields being added in the future; if 
a 'short' configuration list is sent, the missing values at the end
will be left unchanged on the system). If either \fIcommand\fP fails for
any reason, ERROR is returned.
.RS
.PP
The configuration lines are as follows:
-- No. | Name | Value
.TP
.B
0
c_nodename  Node name
.TP
.B
1
c_fqdn  Fully qualified domain name
.TP
.B
2
c_humannode     Human-readable node name
.TP
.B
3
c_phonenum      Land line telephone number of this system
.TP
.B
4
c_creataide     Flag (0 or 1) - creator of private room
automatically becomes room aide
.TP
.B
5
c_sleeping      Server connection idle timeout (in seconds)
.TP
.B
6
c_initax        Initial access level for new users
.TP
.B
7
c_regiscall     Flag (0 or 1) - require registration for new users
.TP
.B
8
c_twitdetect    Flag (0 or 1) - automatically move Problem User
messages to twit room
.TP
.B
9
c_twitroom      Name of twit room
.TP
.B
10
c_moreprompt    Text of <more> prompt
.TP
.B
11
c_restrict      Flag (0 or 1) - restrict access to Internet mail
.TP
.B
12
c_bbs_city      Geographic location of this system
.TP
.B
13
c_sysadm        Name of the system administrator
.TP
.B
14
c_maxsessions   Number of maximum concurrent sessions
allowed on the server
.TP
.B
15
reserved1       (placeholder - this field is no longer in use)
.TP
.B
16
c_userpurge     Default purge time (in days) for users
.TP
.B
17
c_roompurge     Default purge time (in days) for rooms
.TP
.B
18
c_logpages      Name of room to log instant messages to (or
a zero-length name for none)
.TP
.B
19
c_createax      Access level required to create rooms
.TP
.B
20
c_maxmsglen     Maximum message length which may be entered
into the system
.TP
.B
21
c_min_workers   Minimum number of worker threads
.TP
.B
22
c_max_workers   Maximum number of worker threads
.TP
.B
23
c_pop3_port     Port number for POP3 service
.TP
.B
24
c_smtp_port     Port number for SMTP service
.TP
.B
25
c_rfc822_strict_from    Flag (0 or 1) - strict RFC822
adherence - don't correct From: forgeries
.TP
.B
26
c_aide_zap      Flag (0 or 1) - allow Aides to zap (forget) rooms
.TP
.B
27
c_imap_port     Port number for IMAP service
.TP
.B
28
c_net_freq      How often (in seconds) to run the networker
.TP
.B
29
c_disable_newu  Flag (0 or 1) - disable self-service new user
registration
.TP
.B
30
reserved2       (placeholder - this field is no longer in use)
.TP
.B
31
c_purge_hour    Hour (0 through 23) during which database
auto-purge jobs are run
.TP
.B
32
c_ldap_host     Name of host where an LDAP service may be found
.TP
.B
33
c_ldap_port     Port number of LDAP service on above host
.TP
.B
34
c_ldap_base_dn  LDAP Base DN
.TP
.B
35
c_ldap_bind_dn  LDAP Bind DN
.TP
.B
36
c_ldap_bind_pw  Password for LDAP Bind DN
.TP
.B
37
c_ip_addr       Server IP address to listen on
(or "0.0.0.0" for all addresses)
.TP
.B
38
c_msa_port      Port number for SMTP MSA service
.TP
.B
39
c_imaps_port    Port number for IMAPS (SSL-encrypted IMAP)
.TP
.B
40
c_pop3s_port    Port number for POP3S (SSL-encrypted POP3)
.TP
.B
41
c_smtps_port    Port number for SMTPS (SSL-encrypted SMTP)
.TP
.B
42
c_enable_fulltext       Flag (0 or 1) - enable full text search index
.TP
.B
43
c_auto_cull     Flag (0 or 1) - automatically cull database log files
.TP
.B
44
c_instant_expunge       Flag (0 or 1) - enable IMAP "instant expunge"
of deleted messages
.TP
.B
45
c_allow_spoofing        Flag (0 or 1) - allow unauthenticated SMTP
clients to spoof my domains
.TP
.B
46
c_journal_email         Flag (0 or 1) - perform journaling of email messages
.TP
.B
47
c_journal_pubmsgs       Flag (0 or 1) - perform journaling of non-email messages
.TP
.B
48
c_journal_dest  Address to which journalized messages are to be sent
.TP
.B
49
c_default_cal_zone      Default time zone (Olsen database name)
for unzoned calendar items
.TP
.B
50
c_pftcpdict_port        Port number for Postfix TCP Dict
.TP
.B
51
c_mgesve_port   Port number for managesieve service
.TP
.B
52
c_auth_mode     Authentication mode (0 for native, 1 for host auth)
.TP
.B
53
c_funambol_host         Host name of Funambol server with Citadel connector
.TP
.B
54
c_funambol_port         Port number of Funambol server with Citadel connector
.TP
.B
55
c_funambol_source       funambol source
.TP
.B
56
c_funambol_auth         funambol auth
.TP
.B
57
c_rbl_at_greeting       Flag (0 or 1) - perform RBL checks before
SMTP greeting instead of after RCPT \fIcommand\fP
.TP
.B
58
c_master_user   Master user name (if in use)
.TP
.B
59
c_master_pass   Master user password (if in use)
.TP
.B
60
c_pager_program         External pager \fIcommand\fP
.TP
.B
61
c_imap_keep_from        IMAP keep original from header in msgs
.TP
.B
62
c_xmpp_c2s_port         XMPP client-to-server port (usually 5222)
.TP
.B
63
c_xmpp_s2s_port         XMPP server-to-server port (usually 5269)
.TP
.B
63
c_pop3_fetch    Pop3 Aggregator System Default Frequency
.TP
.B
63
c_pop3_fastest  Pop3 Aggregator minimum poll Frequency
.TP
.B
64
c_spam_flag_only        set to 1 to flag spam instead of rejecting it
.TP
.B
65
c_guest_logins  set to 1 to allow anonymous guest logins
.PP
CONF also accepts two additional commands: GETSYS and PUTSYS followed
by an arbitrary MIME type (such as application/x-citadel-internet-config)
which provides a means of storing generic configuration data in the
Global System Configuration room without the need to add extra get/set
commands to the server.
Please note that the LDAP-specific configs have no effect on Citadel
servers in which LDAP support is not enabled.
.RE
.TP
.B
TDAP
manually initate The Dreaded Auto Purger. Nearly all database
maintenance involving the removal of deleted or expired items from
the database is deferred until off-hours in order to improve the
interactive performance of the system. This nightly job is
affectionately known as The Dreaded Auto-Purger, and it runs at an
hour which is specified in the global system configuration.
.RS
.PP
If for some reason you want to manually initiate a run of the purger,
the TDAP \fIcommand\fP can be issued. This \fIcommand\fP will ignore any
parameters passed to it, and of course it will fail if the user is
not an Aide. If the \fIcommand\fP is accepted, OK is returned, and the
purger will begin running within one minute. If the \fIcommand\fP is not
accepted, ERROR is returned. 
.RE
.TP
.B
SMTP
utility commands for the SMTP gateway. This \fIcommand\fP, accessible
only by Aides, supports several utility operations which examine or
manipulate Citadel's SMTP support. The first \fIcommand\fP argument is a
subcommand telling the server what to do. The following subcommands
are supported: 
.RS
.TP
.B
mx|hostname
display all MX hosts for 'hostname'
.TP
.B
runqueue
attempt immediate delivery of all messages in the outbound
SMTP queue, ignoring any retry times stored there
.RE
.TP
.B
ARTV
???. This \fIcommand\fP is deprecated. Use MIGR instead.
.TP
.B
MIGR
MIGRate. This \fIcommand\fP excepts one argument. It can be:
.PP
.nf
.fam C
     export  This will export the informations which is stored in binary
             databases to an XML format.
     import  This will import the informations stored in an XML file. See the 
             EXAMPLES section for how to use it.
.fam T
.fi
.TP
.B
DOWN
shut DOWN the server. This \fIcommand\fP, which may only be executed by
an Aide, immediately shuts down the server. It is only implemented on
servers on which such an operation is possible, such as a multithreaded
Citadel engine. It takes one optional integer Parameter, that tells
the server to try to come up again with the aid of his watcher process,
Though it will do a full shutdown, and do allmost everything except for
reparsing its commandline. If the parameter is set to 0 or is ommited
the server does not restart. DOWN returns OK if the user is allowed to
shut down the server, in which case the client program should expect
the connection to be immediately broken. If the server isn't running
deamonized and is ordered to restart he will answer with an apropriate
error, so the client can tell the user he should pay attenion to this.
.TP
.B
SCDN
Schedule or Cancel a shutDowN. SCDN sets or clears the "scheduled
shutdown" flag. Pass this \fIcommand\fP a 1 or 0 to respectively set or clear
the flag. 2 and 3 will do the same, but make the watcher fire up the
server again instead of shutting down. When the "scheduled shutdown"
flag is set, the server will be shut down when there are no longer
any users logged in. Any value other than 0, 1, 2 or 3 will not
change the flag, only report its state. No users will be kicked off
the system, and in fact the server is still available for new
connections. The \fIcommand\fP returns ERROR if it fails; otherwise, it
returns OK followed by a number representing the current state of the
flag.
.TP
.B
HALT
HALT the server without shutting it down. Identical to the DOWN
\fIcommand\fP, except instead of exiting, the server process cleans up and
then suspends indefinitely. This could potentially be useful for
shutdown scripts that don't want init to automatically respawn
another citserver process.
.SH RESULT CODES
The server will respond to all commands with a 3-digit result
code, which will be the first three characters on the line. The
rest of the line may contain a human-readable string explaining
what happened.
The most significant digit indicates the following:
.PP
-- Integer | Reply Name and Meaning
.TP
.B
1XX
LISTING_FOLLOWS The requested operation is progressing and
is now delivering text. The client *must* now read lines of
text until it receives the termination sequence ("000" on a
line by itself).
.TP
.B
2XX
CIT_OK The requested operation succeeded.
.TP
.B
3XX
MORE_DATA The requested operation succeeded so far, but
another \fIcommand\fP is required to complete it.
.TP
.B
4XX
SEND_LISTING The requested operation is progressing and is
now expecting text. The client *must* now transmit zero or
more lines of text followed by the termination sequence
("000" on a line by itself).
.TP
.B
5XX
ERROR The requested operation failed. The second and
third digits of the error code and/or the error message
following it describes why.
.TP
.B
6XX
BINARY_FOLLOWS After this line please read n bytes.
(n follows after a blank)
.TP
.B
7XX
SEND_BINARY you now may send us n bytes binary data.
(n follows after a blank)
.TP
.B
8XX
START_CHAT_MODE  Every line you send will be broadcasted.
.TP
.B
9XX
ASYNC_MSG Theres a page waiting for you, please fetch it.
.PP
For informatin about the later two digits please see:
http://www.citadel.org/doku.php/documentation:appproto:statuscodes
.SH DEFAULTS
By default \fBsendcommand\fP connects to the citadel servers socket
in /var/run/citadel/.
.SH EXAMPLE
To export and import your data use:
.PP
$ \fBsendcommand\fP "MIGR export" > /tmp/my_database.xml
.PP
$ \fBsendcommand\fP "MIGR import" < /tmp/my_database.xml
.SH LICENSE
\fBsendcommand\fP is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.PP
\fBsendcommand\fP 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.
See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
.SH AUTHOR
The Citadel Team
.PP
This manual page was written by Stefan Jakobs <projects@localside.net>
openSUSE Build Service is sponsored by