* Clarified the delivery list format and shuffled some code about
authorArt Cancro <ajc@citadel.org>
Fri, 21 Jan 2000 03:00:46 +0000 (03:00 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 21 Jan 2000 03:00:46 +0000 (03:00 +0000)
citadel/serv_smtp.c
citadel/techdoc/delivery-list.txt

index 5dacdabb38891bbc3041c8d4f5585dfdc982cd76..60dd06d4f67da712b752f9b8c2a2b639fe696dde 100644 (file)
@@ -58,6 +58,13 @@ enum {                               /* Delivery modes */
 long SYM_SMTP;
 long SYM_SMTP_RECP;
 
+
+
+/*****************************************************************************/
+/*                      SMTP SERVER (INBOUND) STUFF                          */
+/*****************************************************************************/
+
+
 /*
  * Here's where our SMTP session begins its happy day.
  */
@@ -143,7 +150,7 @@ void smtp_get_pass(char *argbuf) {
        lprintf(9, "Trying <%s>\n", password);
        if (CtdlTryPassword(password) == pass_ok) {
                cprintf("235 Authentication successful.\r\n");
-               lprintf(9, "SMTP auth login successful\n");
+               lprintf(9, "SMTP authenticated login successful\n");
                CC->internal_pgm = 0;
                CC->cs_flags &= ~CS_STEALTH;
        }
@@ -376,7 +383,7 @@ void smtp_rcpt(char *argbuf) {
                                strlen(SMTP_RECP) + 1024 );
                        strcat(SMTP_RECP, "room|");
                        strcat(SMTP_RECP, user);
-                       strcat(SMTP_RECP, "|0\n");
+                       strcat(SMTP_RECP, "|0|\n");
                        return;
 
                case rfc822_no_such_user:
@@ -394,7 +401,7 @@ void smtp_rcpt(char *argbuf) {
                                        strlen(SMTP_RECP) + 1024 );
                                strcat(SMTP_RECP, "remote|");
                                strcat(SMTP_RECP, recp);
-                               strcat(SMTP_RECP, "|0\n");
+                               strcat(SMTP_RECP, "|0|\n");
                                return;
                        }
                        return;
@@ -444,8 +451,8 @@ int smtp_message_delivery(struct CtdlMessage *msg) {
        ++successful_saves;
 
        instr = mallok(1024);
-       sprintf(instr, "Content-type: %s\n\nmsgid|%ld\n",
-               SPOOLMIME, msgid);
+       sprintf(instr, "Content-type: %s\n\nmsgid|%ld\nsubmitted|%ld\n",
+               SPOOLMIME, msgid, time(NULL) );
 
        for (i=0; i<SMTP->number_of_recipients; ++i) {
                extract_token(buf, SMTP_RECP, i, '\n');
@@ -654,6 +661,29 @@ void smtp_command_loop(void) {
 }
 
 
+
+
+/*****************************************************************************/
+/*               SMTP CLIENT (OUTBOUND PROCESSING) STUFF                     */
+/*****************************************************************************/
+
+/*
+ * smtp_do_queue()
+ * 
+ * Run through the queue sending out messages.
+ */
+void smtp_do_queue(void) {
+}
+
+
+
+
+
+/*****************************************************************************/
+/*                      MODULE INITIALIZATION STUFF                          */
+/*****************************************************************************/
+
+
 char *Dynamic_Module_Init(void)
 {
        SYM_SMTP = CtdlGetDynamicSymbol();
index fa13b64ed84c9be6258dd64cf4bf955e4b01c08b..25d36531108ceed0eb4bb8a2d571064021c8ea70 100644 (file)
@@ -33,6 +33,13 @@ each line.
     second parameter specifies the message ID in the local database.
  
  
+ INSTRUCTION:  submitted
+ SYNTAX:       submitted|999999999
+ DESCRIPTION:
+    Contains a timestamp designating when this message was first entered into
+    the system.
  INSTRUCTION:  local
  SYNTAX:       local|Friko Mumjiboolean|0
  DESCRIPTION:
@@ -49,15 +56,20 @@ each line.
  
  
  INSTRUCTION:  remote
- SYNTAX:       remote|billg@microsoft.com|0
+ SYNTAX:       remote|billg@microsoft.com|0|delivery status message
  DESCRIPTION:
     Names a recipient on a remote system to which the message should be
-    delivered.  (FIX ... this is where we have to keep track of multiple
-    delivery attempts and transient errors)
+    delivered.  The third parameter may contain any of the following values:
+       0 = No delivery has yet been attempted
+       2 = Delivery was successful
+       3 = A transient error was experienced ... try again later
+       5 = Delivery to this address failed permanently.  The error message
+           should be placed in the fourth field so that a bounce message may
+           be generated.
  
  
  INSTRUCTION:  ignet
- SYNTAX:       ignet|uncnsrd|Lobby|0
+ SYNTAX:       ignet|uncnsrd|Lobby|0|delivery status message
  DESCRIPTION:
     Names a room on another Citadel node to which this message needs to be
     spooled over the network.