* Changed '3' delivery code to '4' to make it more like SMTP
[citadel.git] / citadel / techdoc / delivery-list.txt
1 Description of the custom MIME type "application/x-citadel-delivery-list"
2
3  This MIME type may be found in the outbound queue room on Citadel systems,
4 which is typically called "__CitadelSMTPspoolout__".  The room is flagged as
5 private, but we will eventually hide it even to Aides.  
6  
7  Messages in this format contain delivery instructions.  Therefore, for each
8 message in the queue to be delivered to one or more recipients, there will be
9 *two* messages in the room: one containing the actual message, and the other
10 containing delivery instructions.  It is expected that the instructions
11 message may be replaced at any time (using an Extended ID field) if delivery
12 to only some of the recipients has been accomplished.
13  
14  Citadel keeps reference counts of each message on disk.  Therefore if a
15 message contains a mixture of local and remote recipients, there may be two
16 or more references to the message itself, one of them being the one in the
17 queue.
18   
19  A delivery list contains one or more lines of text, each line containing
20 a single instruction (usually a recipient).  Fields are separated by the
21 vertical bar character ("|") and there will always be at least one field on
22 each line.
23  
24  
25  
26  INSTRUCTION:  msgid
27  SYNTAX:       msgid|0000000
28  DESCRIPTION:  
29     Defines the actual message for which we are providing delivery
30     instructions.  This instruction must precede all the others.  When
31     all deliveries have either succeeded or failed, both the instructions and
32     the copy of the message itself in the queue room should be deleted.  The
33     second parameter specifies the message ID in the local database.
34  
35  
36  INSTRUCTION:  submitted
37  SYNTAX:       submitted|999999999
38  DESCRIPTION:
39     Contains a timestamp designating when this message was first entered into
40     the system.
41  
42  
43  INSTRUCTION:  local
44  SYNTAX:       local|Friko Mumjiboolean|0
45  DESCRIPTION:
46     Indicates the name of a recipient on the local system to which the
47     message must be delivered.  Almost never seen because most code delivers
48     directly.
49  
50  
51  INSTRUCTION:  room
52  SYNTAX:       room|Lobby|0
53  DESCRIPTION:
54     Indicates the name of a room on the local system to which the message
55     must be copied.  Same implications as 'local'.
56  
57  
58  INSTRUCTION:  remote
59  SYNTAX:       remote|billg@microsoft.com|0|delivery status message
60  DESCRIPTION:
61     Names a recipient on a remote system to which the message should be
62     delivered.  The third parameter may contain any of the following values:
63        0 = No delivery has yet been attempted
64        2 = Delivery was successful
65        4 = A transient error was experienced ... try again later
66        5 = Delivery to this address failed permanently.  The error message
67            should be placed in the fourth field so that a bounce message may
68            be generated.
69  
70  
71  INSTRUCTION:  ignet
72  SYNTAX:       ignet|uncnsrd|Lobby|0|delivery status message
73  DESCRIPTION:
74     Names a room on another Citadel node to which this message needs to be
75     spooled over the network.