]> code.citadel.org Git - citadel.git/blobdiff - citadel/journaling.c
* Added "Content-Identifer: ExJournalReport" to journal envelope headers
[citadel.git] / citadel / journaling.c
index de685b87b3f33139d9432b8b519a4bb7cf9e4f5f..f45d601c6fcc054b2b9d4388e744945a843011fe 100644 (file)
@@ -101,7 +101,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
        static int seq = 0;
        int i;
 
-       journal_recps = validate_recipients("FIXME@example.com");       /* FIXME */
+       journal_recps = validate_recipients(config.c_journal_dest);
        if (journal_recps != NULL) {
 
                if (  (journal_recps->num_local > 0)
@@ -128,12 +128,19 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                        sprintf(mime_boundary, "--Citadel-Journal-%08lx-%04x--", time(NULL), ++seq);
                        message_text = malloc(strlen(jmsg->rfc822) + sizeof(struct recptypes) + 1024);
 
+                       /*
+                        * Here is where we begin to compose the journalized message.
+                        * NOTE: the superfluous "Content-Identifer: ExJournalReport" header was
+                        *       requested by a paying customer, and yes, it is intentionally
+                        *       spelled wrong.  Do NOT remove or change it.
+                        */
                        sprintf(message_text,
                                "Content-type: multipart/mixed; boundary=\"%s\"\r\n"
                                "MIME-Version: 1.0\r\n"
                                "\n"
                                "--%s\r\n"
                                "Content-type: text/plain\r\n"
+                               "Content-Identifer: ExJournalReport\r\n"
                                "\r\n"
                                "Sender: %s "
                        ,
@@ -159,27 +166,27 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                                jmsg->msgn
                        );
 
-                       if (journal_recps->num_local > 0) {
-                               for (i=0; i<journal_recps->num_local; ++i) {
-                                       extract_token(recipient, journal_recps->recp_local,
+                       if (jmsg->recps.num_local > 0) {
+                               for (i=0; i<jmsg->recps.num_local; ++i) {
+                                       extract_token(recipient, jmsg->recps.recp_local,
                                                        i, '|', sizeof recipient);
                                        sprintf(&message_text[strlen(message_text)],
                                                "       %s\r\n", recipient);
                                }
                        }
 
-                       if (journal_recps->num_ignet > 0) {
-                               for (i=0; i<journal_recps->num_ignet; ++i) {
-                                       extract_token(recipient, journal_recps->recp_ignet,
+                       if (jmsg->recps.num_ignet > 0) {
+                               for (i=0; i<jmsg->recps.num_ignet; ++i) {
+                                       extract_token(recipient, jmsg->recps.recp_ignet,
                                                        i, '|', sizeof recipient);
                                        sprintf(&message_text[strlen(message_text)],
                                                "       %s\r\n", recipient);
                                }
                        }
 
-                       if (journal_recps->num_internet > 0) {
-                               for (i=0; i<journal_recps->num_internet; ++i) {
-                                       extract_token(recipient, journal_recps->recp_internet,
+                       if (jmsg->recps.num_internet > 0) {
+                               for (i=0; i<jmsg->recps.num_internet; ++i) {
+                                       extract_token(recipient, jmsg->recps.recp_internet,
                                                        i, '|', sizeof recipient);
                                        sprintf(&message_text[strlen(message_text)],
                                                "       %s\r\n", recipient);