changeset 135:ede1002bf6dd

get Cc: header as well
author mmj
date Tue, 01 Jun 2004 04:58:43 +1000
parents 447a561c927e
children baa3dad6154e
files src/mlmmj-process.c
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/mlmmj-process.c	Sun May 30 02:57:59 2004 +1000
+++ b/src/mlmmj-process.c	Tue Jun 01 04:58:43 2004 +1000
@@ -158,12 +158,12 @@
 	FILE *headerfile, *footerfile, *rawmailfile, *donemailfile;
 	struct email_container fromemails = { 0, NULL };
 	struct email_container toemails = { 0, NULL };
-/*	struct email_container ccemails = { 0, NULL };*/
+	struct email_container ccemails = { 0, NULL };
 	const char *badheaders[] = { "From ", "Return-Path:", NULL };
 	struct mailhdr readhdrs[] = {
 		{ "From:", 0, NULL },
 		{ "To:", 0, NULL },
-/*		{ "Cc:", 0, NULL },*/
+		{ "Cc:", 0, NULL },
 		{ NULL, 0, NULL }
 	};
 
@@ -277,13 +277,12 @@
 			find_email_adr(readhdrs[1].values[i], &toemails);
 		}
 	}
-#if 0
+
 	if(readhdrs[2].token) { /* Cc: addresses */
-		for(j = 0; j < readhdrs[1].valuecount; j++) {
-			find_email_adr(readhdrs[1].values[j], &ccemails);
+		for(i = 0; i < readhdrs[1].valuecount; i++) {
+			find_email_adr(readhdrs[1].values[i], &ccemails);
 		}
 	}
-#endif
 	if(strchr(toemails.emaillist[0], RECIPDELIM)) {
 #if 0
 		log_error(LOG_ARGS, "listcontrol(from, %s, %s, %s, %s, %s, %s)\n", listdir, toemails.emaillist[0], mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce);
@@ -292,6 +291,11 @@
 			    mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce);
 		return EXIT_SUCCESS;
 	}
+#if 0
+	for(i = 0; i < toemails.emailcount; i++) {
+		if(strncmp(listaddr, toemails.emaillist[i],
+					strlen(toemails.emaillist[i]))
+#endif
 
 	moderated = statctrl(listdir, "moderated");