# HG changeset patch # User mmj # Date 1083086659 -36000 # Node ID 990e1a4ae6d02af31a7f4134d521a30482a42bd3 # Parent 6fc67cdd957036b8b5b38c1847931ec0d15fb5c0 Small typo and bouncehandling now works diff -r 6fc67cdd9570 -r 990e1a4ae6d0 src/listcontrol.c --- a/src/listcontrol.c Wed Apr 28 03:24:04 2004 +1000 +++ b/src/listcontrol.c Wed Apr 28 03:24:19 2004 +1000 @@ -49,7 +49,9 @@ find_email_adr(tmpstr, &fromemails); - printf("controlstr = [%s]\n", controlstr); +#if 0 + log_error(LOG_ARGS, "controlstr = [%s]\n", controlstr); +#endif if(strncasecmp(controlstr, "subscribe", 9) == 0) { free(controlstr); @@ -120,12 +122,14 @@ } } else /* Not a confirm so silently ignore */ exit(EXIT_SUCCESS); - } else if(strncasecmp(controlstr, "bounce-", 7) == 0) { - controlstr += 7; + } else if(strncasecmp(controlstr, "bounces-", 8) == 0) { + controlstr += 8; bouncenr = strrchr(controlstr, '-'); if (!bouncenr) exit(EXIT_SUCCESS); /* malformed bounce, ignore */ *bouncenr++ = '\0'; +#if 0 log_error(LOG_ARGS, "bounce, bounce, bounce email=[%s] nr=[%s]", controlstr, bouncenr); +#endif execlp(mlmmjbounce, mlmmjbounce, "-L", listdir, "-a", controlstr, diff -r 6fc67cdd9570 -r 990e1a4ae6d0 src/mlmmj-process.c --- a/src/mlmmj-process.c Wed Apr 28 03:24:04 2004 +1000 +++ b/src/mlmmj-process.c Wed Apr 28 03:24:19 2004 +1000 @@ -102,7 +102,8 @@ if(fd == -1) { free(donemailname); - log_error(LOG_ARGS, "could not create mail file in queue directory"); + log_error(LOG_ARGS, "could not create mail file in queue" + "directory"); exit(EXIT_FAILURE); } @@ -112,8 +113,9 @@ exit(EXIT_FAILURE); } - printf("[%s]\n", donemailname); - +#if 0 + log_error(LOG_ARGS, "[%s]\n", donemailname); +#endif if((rawmailfile = fopen(mailfile, "r")) == NULL) { free(donemailname); log_error(LOG_ARGS, "could not fopen() input mail file"); @@ -157,9 +159,9 @@ } if(strchr(toemails.emaillist[0], RECIPDELIM)) { - printf("listcontrol(%s, %s, %s, %s, %s, %s, %s)\n", donemailname, - listdir, toemails.emaillist[0], mlmmjsub, - mlmmjunsub, mlmmjsend, mlmmjbounce); +#if 0 + log_error(LOG_ARGS, "listcontrol(%s, %s, %s, %s, %s, %s, %s)\n", donemailname, listdir, toemails.emaillist[0], mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce); +#endif listcontrol(donemailname, listdir, toemails.emaillist[0], mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce); return EXIT_SUCCESS; diff -r 6fc67cdd9570 -r 990e1a4ae6d0 src/mlmmj-recieve.c --- a/src/mlmmj-recieve.c Wed Apr 28 03:24:04 2004 +1000 +++ b/src/mlmmj-recieve.c Wed Apr 28 03:24:19 2004 +1000 @@ -77,7 +77,8 @@ } if(fd < 0) { - log_error(LOG_ARGS, "could not create mail file in incoming directory"); + log_error(LOG_ARGS, "could not create mail file in " + "%s/incoming directory", listdir); free(infilename); exit(EXIT_FAILURE); } @@ -88,8 +89,9 @@ free(line); } - printf("mlmmj-recieve: wrote %s\n", infilename); - +#if 0 + log_error(LOG_ARGS, "mlmmj-recieve: wrote %s\n", infilename); +#endif close(fd); if(noprocess) { @@ -115,5 +117,5 @@ "-m", infilename, 0); log_error(LOG_ARGS, "execlp() of '%s' failed", mlmmjprocess); - return EXIT_FAILURE; + exit(EXIT_FAILURE); }