]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_smtp.c
* MSG4 (and CtdlOutputMsg() as well) now accepts an optional MIME part
[citadel.git] / citadel / serv_smtp.c
index c5da74dd3e8352964a3a31fcf7b394f4d5e0e945..fcfd49fa16f03433574802ee23d670575221d100 100644 (file)
@@ -625,7 +625,7 @@ void smtp_rcpt(char *argbuf) {
        }
 
        valid = validate_recipients(recp);
-       if (valid->num_error > 0) {
+       if (valid->num_error != 0) {
                cprintf("599 5.1.1 Error: %s\r\n", valid->errormsg);
                free(valid);
                return;
@@ -756,7 +756,7 @@ void smtp_data(void) {
        }
        
        else {                  /* Ok, we'll accept this message. */
-               msgnum = CtdlSubmitMsg(msg, valid, NULL, NULL, "");
+               msgnum = CtdlSubmitMsg(msg, valid, "");
                if (msgnum > 0L) {
                        sprintf(result, "250 2.0.0 Message accepted.\r\n");
                }
@@ -818,7 +818,7 @@ void smtp_command_loop(void) {
        time(&CC->lastcmd);
        memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
        if (client_getln(cmdbuf, sizeof cmdbuf) < 1) {
-               lprintf(CTDL_CRIT, "SMTP socket is broken.  Ending session.\n");
+               lprintf(CTDL_CRIT, "Client disconnected: ending session.\n");
                CC->kill_me = 1;
                return;
        }
@@ -940,7 +940,7 @@ void smtp_try(const char *key, const char *addr, int *status,
        CC->redirect_buffer = malloc(SIZ);
        CC->redirect_len = 0;
        CC->redirect_alloc = SIZ;
-       CtdlOutputMsg(msgnum, MT_RFC822, HEADERS_ALL, 0, 1);
+       CtdlOutputMsg(msgnum, MT_RFC822, HEADERS_ALL, 0, 1, NULL);
        msgtext = CC->redirect_buffer;
        msg_size = CC->redirect_len;
        CC->redirect_buffer = NULL;
@@ -1309,14 +1309,14 @@ void smtp_do_bounce(char *instr) {
                valid = validate_recipients(bounceto);
                if (valid != NULL) {
                        if (valid->num_error == 0) {
-                               CtdlSubmitMsg(bmsg, valid, NULL, NULL, "");
+                               CtdlSubmitMsg(bmsg, valid, "");
                                successful_bounce = 1;
                        }
                }
 
                /* If not, post it in the Aide> room */
                if (successful_bounce == 0) {
-                       CtdlSubmitMsg(bmsg, NULL, NULL, NULL, config.c_aideroom);
+                       CtdlSubmitMsg(bmsg, NULL, config.c_aideroom);
                }
 
                /* Free up the memory we used */
@@ -1550,7 +1550,7 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
                        "attempted|%ld\n"
                        "retry|%ld\n",
                        SPOOLMIME, instr, (long)time(NULL), (long)retry );
-               CtdlSubmitMsg(msg, NULL, NULL, NULL, SMTP_SPOOLOUT_ROOM);
+               CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM);
                CtdlFreeMessage(msg);
        }