New server command DLAT (DownLoad ATtachment) which
[citadel.git] / citadel / techdoc / protocol.txt
index f6d51de1284b7e38d3fb33736048a6e399d6f0f5..8bba36148ad6ede539a837a43538f1c9e26ef47b 100644 (file)
@@ -474,6 +474,10 @@ which case that many message pointers will be returned; "first" plus a
 number, for the corresponding effect; or "gt" plus a number, to list all
 messages in the current room with a message number greater than the one
 specified.  If no parameters are specified, "all" is assumed.
+ In addition, the first parameter may be set to "search", in which case the
+third parameter must be a search string.  This will request all messages
+in the current room whose text contains the search string.
 
  The third argument, may be either 0 or 1.  If it is 1, this command behaves
 differently: before a listing is returned, the client must transmit a list
@@ -632,6 +636,9 @@ parts of the listing:
            directory service using LDAP.
  Line 15 - Set to nonzero if this server does *not* allow self-service
            creation of new user accounts.
+ Line 16 - The default timezone for calendar items which do not have any
+           timezone specified and are not flagged as UTC.  This will be a
+           zone name from the Olsen database.
 
  *** NOTE! ***   The "server type" code is intended to promote global
 compatibility in a scenario in which developers have added proprietary
@@ -889,19 +896,21 @@ which will tell the client whether the file needs to be read (see GOTO above).
 
  DELE   (DELEte a message)
 
- Delete a message from the current room.  The one argument that should be
-passed to this command is the message number of the message to be deleted.
-The return value will be OK if the message was deleted, or an ERROR code.
-If the delete is successful, the message's reference count is decremented, and
-if the reference count reaches zero, the message is removed from the message
-base.
+ Delete one or more messages from the current room.  The one argument that
+should be passed to this command is a message number, or a list of message
+numbers separated by commas, to be deleted.
+
+ The return value will be OK if one or more messages were deleted, or an ERROR
+code.  If the delete is successful, the messages' reference counts are
+decremented, and if the reference count reaches zero, the messages are removed
+from the message base.
 
 
  MOVE   (MOVE or copy a message to a different room)
 
  Move or copy a message to a different room.  This command expects to be
 passed three arguments:
- 0: the message number of the message to be moved or copied.
+ 0: the message number(s) of the message to be moved or copied.
  1: the name of the target room.
  2: flag: 0 to move the message, 1 to copy it without deleting from the
     source room.
@@ -909,6 +918,9 @@ passed three arguments:
  This command never creates or deletes copies of a message; it merely moves
 around links.  When a message is moved, its reference count remains the same.
 When a message is copied, its reference count is incremented.
+ You can move/copy multiple messages with a single command by separating the
+message numbers with commas; for example:  MOVE 112,113,114|Trash|0
 
 
  KILL   (KILL current room)
@@ -1666,6 +1678,14 @@ otherwise, it returns OK followed by a number representing the current state
 of the flag.
 
 
+ HALT   (HALT the server without shutting it down)
+ Identical to the DOWN command, 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.
+
+
  EMSG   (Enter a system MeSsaGe)
 
  This is the opposite of the MESG command - it allows the creation and editing
@@ -1873,6 +1893,8 @@ fails for any reason, ERROR is returned.
  46. Flag (0 or 1) - perform journaling of email messages
  47. Flag (0 or 1) - perform journaling of non-email messages
  48. Address to which journalized messages are to be sent
+ 49. Default time zone (Olsen database name) for unzoned calendar items
+ 50. Port number for Postfix TCP Dict (http://www.postfix.org/tcp_table.5.html)
 
  CONF also accepts two additional commands: GETSYS and PUTSYS followed by an
 arbitrary MIME type (such as application/x-citadel-internet-config) which
@@ -1928,6 +1950,14 @@ appropriate ERROR code will be returned; otherwise, if the open is successful,
 this command will succeed returning the same information as an OPEN command.
 
 
+ DLAT   (DownLoad ATtachment)
+
+ Similar to OPNA, and with the same calling syntax.  The difference is that
+instead of opening a download file for block transfer, this command outputs the
+entire decoded MIME section at once, using a BINARY_FOLLOWS response.  This is
+useful for outputting small objects such as calendar items.
  GEXP   (Get instant messages)
 
  This is a more sophisticated way of retrieving instant messages than the old
@@ -2143,15 +2173,30 @@ may be issued:
   ERROR codes will be returned.
  
  ICAL sgi|<bool>
+  Readers who are paying attention will notice that there is no subcommand to
+  send out meeting invitations.  This is because that task can be handled
+  automatically by the Citadel server.  Issue this command with <bool> set to 1
+  to enable Server Generated Invitations.  In this mode, when an event is saved
+  to the user's Calendar> room and it contains attendees, Citadel will
+  automatically turn the event into calendar REQUEST messages and mail them
+  out to all listed attendees.  If for some reason the client needs to disable
+  Server Generated Invitations, the command may be sent again with <bool> = 0.
  
- Readers who are paying attention will notice that there is no subcommand to
-send out meeting invitations.  This is because that task can be handled
-automatically by the Citadel server.  Issue this command with <bool> set to 1
-to enable Server Generated Invitations.  In this mode, when an event is saved
-to the user's Calendar> room and it contains attendees, Citadel will
-automatically turn the event into vCalendar REQUEST messages and mail them
-out to all listed attendees.  If for some reason the client needs to disable
-Server Generated Invitations, the command may be sent again with <bool> = 0.
+ ICAL getics
+  Output the contents of the entire calendar (assuming we are in a calendar
+  room) as one big data stream.  All of the events (or tasks, etc.) in the room
+  are combined into a single VCALENDAR object, which is then serialized and
+  transmitted to the client.  This is suitable for subscribing to a calendar
+  in third-party software.  This command will output LISTING_FOLLOWS followed
+  by the calendar data stream, or ERROR if the requested operation is not
+  permitted.
+ ICAL putics
+  Delete the entire contents of a calendar room and replace it with the calendar
+  supplied by a client-input data stream.  This is suitable for publishing a
+  calendar from third-party software.  This command will output SEND_LISTING and
+  then expect the client to transmit the calendar data stream.  Alternatively,
+  it will return ERROR if the requested operation is not permitted.
 
 
 
@@ -2242,6 +2287,7 @@ only in rooms to which the user does not have access.
 guaranteed to continue to exist in this form.
 
 
+
 EUID   (get message number using an EUID)}
 
  Returns the message number, if present, of the message in the current room
@@ -2257,6 +2303,44 @@ change even when the message number changes due to an update.
  If no message exists in the current room with the supplied EUID, the command
 returns ERROR+MESSAGE_NOT_FOUND.
 
+
+MSIV   (Manage SIeVe scripts)
+
+This command is the interface to Citadel's implementation of Sieve, the 
+mail filtering and sorting language.  Clients may automate the handling 
+of incoming messages to their inbox by administering one or more Sieve 
+scripts.   The available subcommands are:
+
+ MSIV putscript|<scriptname>
+
+   Add a new script or replace an existing one.  Always returns 
+SEND_LISTING and expects the client to transmit the script content.
+
+ MSIV listscripts
+
+   List the scripts which are available for this account.  Returns 
+LISTING_FOLLOWS followed by a list of available scripts.  Each line of 
+the output contains two parameters: the name of the script, and 0 or 1 
+to indicate whether the script is active.
+
+ MSIV setactive|<scriptname>
+
+   Choose which script is to become the active one that handles the 
+user's inbox.  <scriptname> must be either the name of an existing 
+script or an empty string to indicate that the user wishes to disable 
+all scripts.   Returns OK if successful, or ERROR if the supplied name 
+is invalid.
+
+ MSIV getscript|<scriptname>
+
+   Output one of the existing scripts.  Returns LISTING_FOLLOWS followed 
+by the script, or ERROR if the named script does not exist.
+
+ MSIV deletescript|<scriptname>
+
+   Delete one of the existing scripts.  Returns OK if the script was 
+deleted, or ERROR if the named script does not exist or cannot be 
+deleted because it is active.