da66a322eebc9dec0b2136d4ff44b9ab1fbf840e
[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:  attempted
44  SYNTAX:       attempted|999999999
45  DESCRIPTION:
46     Contains a timestamp designating the date/time of the last delivery
47     attempt.
48  
49  
50  INSTRUCTION:  retry
51  SYNTAX:       retry|9999999
52  DESCRIPTION:
53     Citadel does not retry SMTP delivery at a fixed interval.  Instead, it
54 starts at a nominal interval (15 minutes by default) and then doubles the
55 interval after each failed attempt.  This instruction contains the interval
56 which should currently be followed (and doubled again, if the next delivery
57 fails).
58   
59   
60  INSTRUCTION:  bounceto
61  SYNTAX:       bounceto|Big Bad Sender[@host]
62  DESCRIPTION:
63     Where to send "bounce" messages (delivery status notifications).  The
64     contents of the second field are supplied as the "recipient" field to
65     CtdlSaveMsg(), and therefore may be a local username, a user on another
66     Citadel, or an Internet e-mail address.
67  
68  
69  INSTRUCTION:  local
70  SYNTAX:       local|Friko Mumjiboolean|0
71  DESCRIPTION:
72     Indicates the name of a recipient on the local system to which the
73     message must be delivered.  Almost never seen because most code delivers
74     directly.
75  
76  
77  INSTRUCTION:  room
78  SYNTAX:       room|Lobby|0
79  DESCRIPTION:
80     Indicates the name of a room on the local system to which the message
81     must be copied.  Same implications as 'local'.
82  
83  
84  INSTRUCTION:  remote
85  SYNTAX:       remote|friko@mumjiboolean.com|0|delivery status message
86  DESCRIPTION:
87     Names a recipient on a remote system to which the message should be
88     delivered.  The third parameter may contain any of the following values:
89        0 = No delivery has yet been attempted
90        2 = Delivery was successful
91        4 = A transient error was experienced ... try again later
92        5 = Delivery to this address failed permanently.  The error message
93            should be placed in the fourth field so that a bounce message may
94            be generated.
95  
96  
97  INSTRUCTION:  ignet
98  SYNTAX:       ignet|uncnsrd|Lobby|0|delivery status message
99  DESCRIPTION:
100     Names a room on another Citadel node to which this message needs to be
101     spooled over the network.