From: Art Cancro Date: Fri, 21 Jan 2000 03:00:46 +0000 (+0000) Subject: * Clarified the delivery list format and shuffled some code about X-Git-Tag: v7.86~7336 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6671b683ee2121eccd9ef1f18ad8a98c2168e6a1 * Clarified the delivery list format and shuffled some code about --- diff --git a/citadel/serv_smtp.c b/citadel/serv_smtp.c index 5dacdabb3..60dd06d4f 100644 --- a/citadel/serv_smtp.c +++ b/citadel/serv_smtp.c @@ -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; inumber_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(); diff --git a/citadel/techdoc/delivery-list.txt b/citadel/techdoc/delivery-list.txt index fa13b64ed..25d365311 100644 --- a/citadel/techdoc/delivery-list.txt +++ b/citadel/techdoc/delivery-list.txt @@ -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.