]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/smtp_util.c
Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
[citadel.git] / citadel / modules / smtp / smtp_util.c
index 6dcf95fb01d8e716b509300a3e0cba74a709766a..e4a4c2da5eadb0e83c6d1e3597354f37d9a914ea 100644 (file)
@@ -119,7 +119,7 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        time_t submitted = 0L;
        struct CtdlMessage *bmsg = NULL;
        int give_up = 0;
-       struct recptypes *valid;
+       recptypes *valid;
        int successful_bounce = 0;
        static int seq = 0;
        StrBuf *BounceMB;
@@ -163,7 +163,7 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        bmsg->cm_format_type = FMT_RFC822;
        CM_SetField(bmsg, eAuthor, HKEY("Citadel"));
        CM_SetField(bmsg, eOriginalRoom, HKEY(MAILROOM));
-       CM_SetField(bmsg, eNodeName, config.c_nodename, strlen(config.c_nodename));
+       CM_SetField(bmsg, eNodeName, CFG_KEY(c_nodename));
        CM_SetField(bmsg, eMsgSubject, HKEY("Delivery Status Notification (Failure)"));
        StrBufAppendBufPlain(
                BounceMB,
@@ -287,6 +287,7 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
        StrBufAppendBuf(BounceMB, boundary, 0);
        StrBufAppendBufPlain(BounceMB, HKEY("--\r\n"), 0);
        CM_SetAsFieldSB(bmsg, eMesageText, &BounceMB);
+
        /* Deliver the bounce if there's anything worth mentioning */
        syslog(LOG_DEBUG, "num_bounces = %d\n", num_bounces);
        if (num_bounces > 0) {
@@ -318,6 +319,6 @@ void smtp_do_bounce(char *instr, StrBuf *OMsgTxt)
                }
        }
        FreeStrBuf(&boundary);
-       CtdlFreeMessage(bmsg);
+       CM_Free(bmsg);
        syslog(LOG_DEBUG, "Done processing bounces\n");
 }