Index: ossp-pkg/petidomo/config-files.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/config-files.c,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/petidomo/config-files.c,v' 2>/dev/null --- config-files.c 2001/01/20 13:26:00 1.1 +++ config-files.c 2001/01/20 13:52:41 1.2 @@ -43,7 +43,7 @@ static char* list_dir = LOCALSTATEDIR "/lists"; static char* ack_queue_dir = LOCALSTATEDIR "/ack_queue"; -int InitPetidomo(const char* masterconfig_path) +int InitPetidomo(const char* masterconfig) { int rc; @@ -78,7 +78,7 @@ /* Parse the config file. */ - rc = ReadConfig(masterconfig_path, MasterCF); + rc = ReadConfig(masterconfig, MasterCF); if (rc != 0) { syslog(LOG_ERR, "Failed to parse the master config file."); @@ -89,17 +89,17 @@ if (fqdn == NULL) { - syslog(LOG_ERR, "The master config file \"%s\" doesn't set the host name.", masterconfig_path); + syslog(LOG_ERR, "The master config file \"%s\" doesn't set the host name.", masterconfig); return -1; } if (mta == NULL) { - syslog(LOG_ERR, "The master config file \"%s\" doesn't set the MTA.", masterconfig_path); + syslog(LOG_ERR, "The master config file \"%s\" doesn't set the MTA.", masterconfig); return -1; } if (master_password == NULL) { - syslog(LOG_ERR, "The master config file \"%s\" doesn't set the admin password.", masterconfig_path); + syslog(LOG_ERR, "The master config file \"%s\" doesn't set the admin password.", masterconfig); return -1; } if (strstr(mta_options, "%s") == NULL) Index: ossp-pkg/petidomo/hermes.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v' 2>/dev/null --- hermes.c 2001/01/19 16:46:25 1.16 +++ hermes.c 2001/01/20 13:52:41 1.17 @@ -200,11 +200,11 @@ { fprintf(fh, "From: petidomo-approve@%s (Petidomo Mailing List Server)\n", ListConfig->fqdn); fprintf(fh, "To: %s\n", originator); - fprintf(fh, "Subject: Petidomo: CONFIRM %s@%s: Your posting to list \"%s\"\n", listname, ListConfig->fqdn, listname); + fprintf(fh, "Subject: Petidomo: APPROVE %s@%s: Your posting to list \"%s\"\n", listname, ListConfig->fqdn, listname); fprintf(fh, "Precedence: junk\n"); fprintf(fh, "Sender: %s\n", owner); fprintf(fh, "\n"); - fprintf(fh, "Your posting needs to be confirmed. Do this by replying\n"); + fprintf(fh, "Your posting needs to be approved. Do this by replying\n"); fprintf(fh, "to this mail and citing the string\n"); fprintf(fh, "\n"); fprintf(fh, " %s\n", cookie); @@ -260,12 +260,12 @@ { fprintf(fh, "From: petidomo-approve@%s (Petidomo Mailing List Server)\n", ListConfig->fqdn); fprintf(fh, "To: %s\n", originator); - fprintf(fh, "Subject: Petidomo: CONFIRM %s@%s: Your posting to list \"%s\"\n", + fprintf(fh, "Subject: Petidomo: APPROVE %s@%s: Your posting to list \"%s\"\n", listname, ListConfig->fqdn, listname); fprintf(fh, "Precedence: junk\n"); fprintf(fh, "Sender: %s\n", owner); fprintf(fh, "\n"); - fprintf(fh, "Your posting needs to be confirmed. Do this by replying\n"); + fprintf(fh, "Your posting needs to be approved. Do this by replying\n"); fprintf(fh, "to this mail and citing the string\n"); fprintf(fh, "\n"); fprintf(fh, " %s\n", cookie); Index: ossp-pkg/petidomo/main.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v rcsdiff -q -kk '-r1.17' '-r1.18' -u '/v/ossp/cvs/ossp-pkg/petidomo/main.c,v' 2>/dev/null --- main.c 2001/01/20 11:19:14 1.17 +++ main.c 2001/01/20 13:52:41 1.18 @@ -37,7 +37,7 @@ static char* listname = NULL; static char* mode = NULL; -static char* masterconfig_path = SYSCONFDIR "/petidomo.conf"; +char* masterconfig_path = SYSCONFDIR "/petidomo.conf"; char g_is_approved = ARGV_FALSE; const char* who_am_i; Index: ossp-pkg/petidomo/petidomo.h RCS File: /v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v rcsdiff -q -kk '-r1.18' '-r1.19' -u '/v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v' 2>/dev/null --- petidomo.h 2001/01/20 13:42:01 1.18 +++ petidomo.h 2001/01/20 13:52:41 1.19 @@ -51,6 +51,7 @@ extern char g_is_approved; extern const char* who_am_i; +extern char* masterconfig_path; /********** config.c **********/ @@ -104,7 +105,7 @@ char * ack_file; }; -int InitPetidomo(const char* masterconfig_path); +int InitPetidomo(const char*); const struct PD_Config *getMasterConfig(void); const struct List_Config *getListConfig(const char* listname); Index: ossp-pkg/petidomo/queue-command.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/queue-command.c,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/petidomo/queue-command.c,v' 2>/dev/null --- queue-command.c 2001/01/20 13:42:01 1.1 +++ queue-command.c 2001/01/20 13:52:41 1.2 @@ -39,9 +39,8 @@ syslog(LOG_ERR, "Opening ack spool file \"%s\" failed: %s", buffer, strerror(errno)); exit(1); } - fprintf(fh, "#! /bin/sh\n"); - fprintf(fh, "\n"); - fprintf(fh, "%s --mode=listserv --approved <<[end-of-%s-marker]\n", who_am_i, cookie); + fprintf(fh, "#!/bin/sh\n"); + fprintf(fh, "%s \\\n--masterconf=%s \\\n--mode=listserv --approved \\\n<<[end-of-%s-marker]\n", who_am_i, masterconfig_path, cookie); fprintf(fh, "Sender: %s\n", mail->Envelope); fprintf(fh, "From: %s\n", mail->From); if (mail->Reply_To) Index: ossp-pkg/petidomo/subscribe.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v rcsdiff -q -kk '-r1.19' '-r1.20' -u '/v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v' 2>/dev/null --- subscribe.c 2001/01/19 14:56:33 1.19 +++ subscribe.c 2001/01/20 13:52:41 1.20 @@ -88,9 +88,9 @@ fprintf(fh, "\n"); buffer = text_easy_sprintf("You tried to subscribe the address \"%s\" to a mailing list. " \ "Unfortunately, your request could not be processed, because " \ - "you didn't specify a valid mailing list name to which the " \ + "you did not specify a valid mailing list name to which the " \ "address should be subscribed to. You may use the command INDEX " \ - "to receive an overview over the available mailing lists. Also, " \ + "to receive an overview of the available mailing lists. Also, " \ "use the command HELP to verify that you got the command syntax " \ "right.", address); text_wordwrap(buffer, 70); @@ -212,7 +212,7 @@ if (isValidAdminPassword(getPassword(), listname) == FALSE && ListConfig->subtype == SUBSCRIPTION_ACKED && !g_is_approved) { - /* Require confirmation. */ + /* Require approval. */ char* command; char* cookie; @@ -223,25 +223,28 @@ command = text_easy_sprintf("subscribe %s %s", address, listname); cookie = queue_command(MailStruct, command); - /* Send request for confirmation to the user. */ + /* Send request for approval to the user. */ fh = vOpenMailer(envelope, address, NULL); if (fh != NULL) { fprintf(fh, "From: petidomo-approve@%s (Petidomo Mailing List Server)\n", ListConfig->fqdn); fprintf(fh, "To: %s\n", address); - fprintf(fh, "Subject: Petidomo: CONFIRM %s@%s: Request from \"%s\"\n", listname, ListConfig->fqdn, originator); + if (strcasecmp(address, originator) == 0) + fprintf(fh, "Subject: Petidomo: APPROVE %s@%s: Your request \"subscribe %s\"\n", listname, ListConfig->fqdn, listname); + else + fprintf(fh, "Subject: Petidomo: APPROVE %s@%s: Request \"subscribe %s\" from \"%s\"\n", listname, ListConfig->fqdn, listname, originator); fprintf(fh, "Precedence: junk\n"); fprintf(fh, "Sender: %s\n", envelope); fprintf(fh, "\n"); if (strcasecmp(address, originator) == 0) buffer = text_easy_sprintf("You requested that the address \"%s\" should be subscribed to " \ - "the mailing list \"%s\". This will not happen unless you confirm the " \ + "the mailing list \"%s\". This will not happen unless you approve the " \ "request by replying to this mail and citing the string", address, listname); else buffer = text_easy_sprintf("Per request from \"%s\", the address \"%s\" should be subscribed to " \ - "the mailing list \"%s\". This will not happen unless you confirm the " \ + "the mailing list \"%s\". This will not happen unless you approve the " \ "request by replying to this mail and citing the string", originator, address, listname); text_wordwrap(buffer, 70); @@ -250,7 +253,7 @@ fprintf(fh, "in your reply.\n"); CloseMailer(fh); - /* If the request for confirmation has been sent to an + /* If the request for approval has been sent to an address different to that of the originator, notify him what happened. */ @@ -267,8 +270,9 @@ fprintf(fh, "Precedence: junk\n"); fprintf(fh, "Sender: %s\n", envelope); fprintf(fh, "\n"); - fprintf(fh, "Subscribing the address will need confirmation. Such a\n"); - fprintf(fh, "request has been sent to the address already, so don't move!\n"); + fprintf(fh, "Subscribing the address \"%s\" to the list \"%s\"\n", address, listname); + fprintf(fh, "requires additional approval by \"%s\". A request\n", address); + fprintf(fh, "has been sent to this address. We are now awaiting the approval.\n"); CloseMailer(fh); } else @@ -361,7 +365,7 @@ fprintf(fh, "From: %s-request@%s (Petidomo Mailing List Server)\n", listname, ListConfig->fqdn); fprintf(fh, "To: %s\n", address); - fprintf(fh, "Subject: Petidomo: Welcome to the \"%s\" mailing list!\n", listname); + fprintf(fh, "Subject: Petidomo: Welcome to \"%s@%s\"!\n", listname, ListConfig->fqdn); if (MailStruct->Message_Id != NULL) fprintf(fh, "In-Reply-To: %s\n", MailStruct->Message_Id); fprintf(fh, "Precedence: junk\n"); Index: ossp-pkg/petidomo/unsubscribe.c RCS File: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v rcsdiff -q -kk '-r1.18' '-r1.19' -u '/v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v' 2>/dev/null --- unsubscribe.c 2001/01/19 14:56:33 1.18 +++ unsubscribe.c 2001/01/20 13:52:41 1.19 @@ -89,9 +89,9 @@ fprintf(fh, "\n"); buffer = text_easy_sprintf("You tried to unsubscribe the address \"%s\" from a mailing list. " \ "Unfortunately, your request could not be processed, because " \ - "you didn't specify a valid mailing list name from which the " \ + "you did not specify a valid mailing list name from which the " \ "address should be unsubscribed. You may use the command INDEX " \ - "to receive an overview over the available mailing lists. Also, " \ + "to receive an overview of the available mailing lists. Also, " \ "use the command HELP to verify that you got the command syntax " \ "right.", address); text_wordwrap(buffer, 70); @@ -215,7 +215,7 @@ if (isValidAdminPassword(getPassword(), listname) == FALSE && ListConfig->subtype == SUBSCRIPTION_ACKED && !g_is_approved) { - /* Require confirmation. */ + /* Require approval. */ char* command; char* cookie; @@ -226,25 +226,28 @@ command = text_easy_sprintf("unsubscribe %s %s", address, listname); cookie = queue_command(MailStruct, command); - /* Send request for confirmation to the user. */ + /* Send request for approval to the user. */ fh = vOpenMailer(envelope, address, NULL); if (fh != NULL) { fprintf(fh, "From: petidomo-approve@%s (Petidomo Mailing List Server)\n", ListConfig->fqdn); fprintf(fh, "To: %s\n", address); - fprintf(fh, "Subject: Petidomo: CONFIRM %s@%s: Request from \"%s\"\n", listname, ListConfig->fqdn, originator); + if (strcasecmp(address, originator) == 0) + fprintf(fh, "Subject: Petidomo: APPROVE %s@%s: Your request \"subscribe %s\"\n", listname, ListConfig->fqdn, listname); + else + fprintf(fh, "Subject: Petidomo: APPROVE %s@%s: Request \"subscribe %s\" from \"%s\"\n", listname, ListConfig->fqdn, listname, originator); fprintf(fh, "Precedence: junk\n"); fprintf(fh, "Sender: %s\n", envelope); fprintf(fh, "\n"); if (strcasecmp(address, originator) == 0) buffer = text_easy_sprintf("You requested that the address \"%s\" should be unsubscribed from " \ - "the mailing list \"%s\". This will not happen unless you confirm the " \ + "the mailing list \"%s\". This will not happen unless you approve the " \ "request by replying to this mail and citing the string", originator, address, listname); else buffer = text_easy_sprintf("Per request from \"%s\", the address \"%s\" should be unsubscribed from " \ - "the mailing list \"%s\". This will not happen unless you confirm the " \ + "the mailing list \"%s\". This will not happen unless you approve the " \ "request by replying to this mail and citing the string", originator, address, listname); text_wordwrap(buffer, 70); @@ -259,7 +262,7 @@ return -1; } - /* If the request for confirmation has been sent to an + /* If the request for approval has been sent to an address different to that of the originator, notify him what happened. */ @@ -276,8 +279,9 @@ fprintf(fh, "Precedence: junk\n"); fprintf(fh, "Sender: %s\n", envelope); fprintf(fh, "\n"); - fprintf(fh, "Unsubscribing the address will need confirmation. Such a\n"); - fprintf(fh, "request has been sent to the address already, so don't move!\n"); + fprintf(fh, "Unsubscribing the address \"%s\" from the list \"%s\"\n", address, listname); + fprintf(fh, "requires additional approval by \"%s\". A request\n", address); + fprintf(fh, "has been sent to this address. We are now awaiting the approval.\n"); CloseMailer(fh); } else