OSSP CVS Repository

ossp - Check-in [346]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 346
Date: 2001-Jan-20 14:52:41 (local)
2001-Jan-20 13:52:41 (UTC)
User:rse
Branch:
Comment: First bunch of cosmetic adjustments to text messages. Additionally --masterconf=FILE is also passed through to files created in acknowledge directory.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/config-files.c      1.1 -> 1.2     7 inserted, 7 deleted
ossp-pkg/petidomo/hermes.c      1.16 -> 1.17     5 inserted, 5 deleted
ossp-pkg/petidomo/main.c      1.17 -> 1.18     2 inserted, 2 deleted
ossp-pkg/petidomo/petidomo.h      1.18 -> 1.19     3 inserted, 2 deleted
ossp-pkg/petidomo/queue-command.c      1.1 -> 1.2     4 inserted, 5 deleted
ossp-pkg/petidomo/subscribe.c      1.19 -> 1.20     16 inserted, 12 deleted
ossp-pkg/petidomo/unsubscribe.c      1.18 -> 1.19     15 inserted, 11 deleted

ossp-pkg/petidomo/config-files.c 1.1 -> 1.2

--- config-files.c       2001/01/20 13:26:00     1.1
+++ config-files.c       2001/01/20 13:52:41     1.2
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/config-files.c,v $
-   $Revision: 1.1 $
+   $Revision: 1.2 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -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)


ossp-pkg/petidomo/hermes.c 1.16 -> 1.17

--- hermes.c     2001/01/19 16:46:25     1.16
+++ hermes.c     2001/01/20 13:52:41     1.17
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
-   $Revision: 1.16 $
+   $Revision: 1.17 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -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);


ossp-pkg/petidomo/main.c 1.17 -> 1.18

--- main.c       2001/01/20 11:19:14     1.17
+++ main.c       2001/01/20 13:52:41     1.18
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
-   $Revision: 1.17 $
+   $Revision: 1.18 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -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;
 


ossp-pkg/petidomo/petidomo.h 1.18 -> 1.19

--- petidomo.h   2001/01/20 13:42:01     1.18
+++ petidomo.h   2001/01/20 13:52:41     1.19
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/petidomo.h,v $
-   $Revision: 1.18 $
+   $Revision: 1.19 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -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);
 


ossp-pkg/petidomo/queue-command.c 1.1 -> 1.2

--- queue-command.c      2001/01/20 13:42:01     1.1
+++ queue-command.c      2001/01/20 13:52:41     1.2
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/queue-command.c,v $
-   $Revision: 1.1 $
+   $Revision: 1.2 $
 
    Copyright (C) 2000 by Peter Simons <simons@computer.org>.
 
@@ -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)


ossp-pkg/petidomo/subscribe.c 1.19 -> 1.20

--- subscribe.c  2001/01/19 14:56:33     1.19
+++ subscribe.c  2001/01/20 13:52:41     1.20
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v $
-   $Revision: 1.19 $
+   $Revision: 1.20 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -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");


ossp-pkg/petidomo/unsubscribe.c 1.18 -> 1.19

--- unsubscribe.c        2001/01/19 14:56:33     1.18
+++ unsubscribe.c        2001/01/20 13:52:41     1.19
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v $
-   $Revision: 1.18 $
+   $Revision: 1.19 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -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

CVSTrac 2.0.1