From 727cb694ec779d6605ad9abdb2603b25f42e7d4d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 19 Jan 2001 14:53:23 +0000 Subject: [PATCH] Incorporated the cookie into the end-of-mail-marker used in the ack-script, so that the whole mechanism doesn't break when somebody has the words '[end-of-mail-marker]' in the mail body itself. --- queue_command.c | 4 ++-- queue_posting.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/queue_command.c b/queue_command.c index 03ed624..380036a 100644 --- a/queue_command.c +++ b/queue_command.c @@ -39,7 +39,7 @@ char* queue_command(const struct Mail* mail, const char* command) } fprintf(fh, "#! /bin/sh\n"); fprintf(fh, "\n"); - fprintf(fh, "%s --mode=listserv --approved <<[end-of-mail-marker]\n", who_am_i); + fprintf(fh, "%s --mode=listserv --approved <<[end-of-%s-marker]\n", who_am_i, cookie); fprintf(fh, "Sender: %s\n", mail->Envelope); fprintf(fh, "From: %s\n", mail->From); if (mail->Reply_To) @@ -50,7 +50,7 @@ char* queue_command(const struct Mail* mail, const char* command) fprintf(fh, "Approve: %s\n", mail->Approve); fprintf(fh, "\n"); fprintf(fh, "%s\n", command); - fprintf(fh, "[end-of-mail-marker]\n"); + fprintf(fh, "[end-of-%s-marker]\n", cookie); fclose(fh); chmod(buffer, 0755); free(buffer); diff --git a/queue_posting.c b/queue_posting.c index 5587d76..a96c177 100644 --- a/queue_posting.c +++ b/queue_posting.c @@ -39,10 +39,10 @@ char* queue_posting(const struct Mail* mail, const char* listname) } fprintf(fh, "#! /bin/sh\n"); fprintf(fh, "\n"); - fprintf(fh, "%s --mode=deliver --listname=%s --approved <<[end-of-mail-marker]\n", who_am_i, listname); + fprintf(fh, "%s --mode=deliver --listname=%s --approved <<[end-of-%s-marker]\n", who_am_i, listname, cookie); fprintf(fh, "%s\n", mail->Header); fprintf(fh, "%s", mail->Body); - fprintf(fh, "[end-of-mail-marker]\n"); + fprintf(fh, "[end-of-%s-marker]\n", cookie); fclose(fh); chmod(buffer, 0755); free(buffer);