* Coded up the "bounce" functions. Still a coupla bugs.
[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:  bounceto
51  SYNTAX:       bounceto|Big Bad Sender[@host]
52  DESCRIPTION:
53     Where to send "bounce" messages (delivery status notifications).  The
54     contents of the second field are supplied as the "recipient" field to
55     CtdlSaveMsg(), and therefore may be a local username, a user on another
56     Citadel, or an Internet e-mail address.
57  
58  
59  INSTRUCTION:  local
60  SYNTAX:       local|Friko Mumjiboolean|0
61  DESCRIPTION:
62     Indicates the name of a recipient on the local system to which the
63     message must be delivered.  Almost never seen because most code delivers
64     directly.
65  
66  
67  INSTRUCTION:  room
68  SYNTAX:       room|Lobby|0
69  DESCRIPTION:
70     Indicates the name of a room on the local system to which the message
71     must be copied.  Same implications as 'local'.
72  
73  
74  INSTRUCTION:  remote
75  SYNTAX:       remote|billg@microsoft.com|0|delivery status message
76  DESCRIPTION:
77     Names a recipient on a remote system to which the message should be
78     delivered.  The third parameter may contain any of the following values:
79        0 = No delivery has yet been attempted
80        2 = Delivery was successful
81        4 = A transient error was experienced ... try again later
82        5 = Delivery to this address failed permanently.  The error message
83            should be placed in the fourth field so that a bounce message may
84            be generated.
85  
86  
87  INSTRUCTION:  ignet
88  SYNTAX:       ignet|uncnsrd|Lobby|0|delivery status message
89  DESCRIPTION:
90     Names a room on another Citadel node to which this message needs to be
91     spooled over the network.