OSSP CVS Repository

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

Check-in Number: 288
Date: 2001-Jan-16 13:09:12 (local)
2001-Jan-16 12:09:12 (UTC)
User:simons
Branch:
Comment: When a request for confirmation is required, the originator of the command will receive a short mail, telling him that this is so, so that he knows what's going on.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/subscribe.c      1.13 -> 1.14     24 inserted, 6 deleted
ossp-pkg/petidomo/unsubscribe.c      1.12 -> 1.13     22 inserted, 3 deleted

ossp-pkg/petidomo/subscribe.c 1.13 -> 1.14

--- subscribe.c  2001/01/16 11:57:51     1.13
+++ subscribe.c  2001/01/16 12:09:12     1.14
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v $
-   $Revision: 1.13 $
+   $Revision: 1.14 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -186,11 +186,9 @@
         fh = vOpenMailer(envelope, originator, NULL);
         if (fh != NULL)
             {
-            fprintf(fh, "From: %s-request@%s (Petidomo Mailing List Server)\n",
-                    listname, ListConfig->fqdn);
+            fprintf(fh, "From: %s-request@%s (Petidomo Mailing List Server)\n", listname, ListConfig->fqdn);
             fprintf(fh, "To: %s\n", originator);
-            fprintf(fh, "Subject: Petidomo: Your request \"subscribe %s %s\"\n",
-                    address, listname);
+            fprintf(fh, "Subject: Petidomo: Your request \"subscribe %s %s\"\n", address, listname);
             if (MailStruct->Message_Id != NULL)
                 fprintf(fh, "In-Reply-To: %s\n", MailStruct->Message_Id);
             fprintf(fh, "Precedence: junk\n");
@@ -235,13 +233,33 @@
             fprintf(fh, "\n    %s\n\n", cookie);
             fprintf(fh, "in your reply.\n");
             CloseMailer(fh);
+
+            fh = vOpenMailer(envelope, originator, NULL);
+            if (fh != NULL)
+                {
+                fprintf(fh, "From: %s-request@%s (Petidomo Mailing List Server)\n", listname, ListConfig->fqdn);
+                fprintf(fh, "To: %s\n", originator);
+                fprintf(fh, "Subject: Petidomo: Your request \"subscribe %s %s\"\n", address, listname);
+                if (MailStruct->Message_Id != NULL)
+                    fprintf(fh, "In-Reply-To: %s\n", MailStruct->Message_Id);
+                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");
+                CloseMailer(fh);
+                }
+            else
+                {
+                syslog(LOG_ERR, "Failed to send email to \"%s\" concerning his request.", originator);
+                return -1;
+                }
             }
         else
             {
             syslog(LOG_ERR, "Failed to send email to \"%s\"!", owner);
             return -1;
             }
-
         return 0;
         }
 


ossp-pkg/petidomo/unsubscribe.c 1.12 -> 1.13

--- unsubscribe.c        2001/01/16 11:57:51     1.12
+++ unsubscribe.c        2001/01/16 12:09:12     1.13
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v $
-   $Revision: 1.12 $
+   $Revision: 1.13 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -218,8 +218,6 @@
             char* command = text_easy_sprintf("unsubscribe %s %s", address, listname);
             char* cookie  = queue_command(MailStruct, command);
 
-            /* Notify the owner. */
-
             fh = vOpenMailer(envelope, address, NULL);
             if (fh != NULL)
                 {
@@ -245,6 +243,27 @@
                 return -1;
                 }
 
+            fh = vOpenMailer(envelope, originator, NULL);
+            if (fh != NULL)
+                {
+                fprintf(fh, "From: %s-request@%s (Petidomo Mailing List Server)\n", listname, ListConfig->fqdn);
+                fprintf(fh, "To: %s\n", originator);
+                fprintf(fh, "Subject: Petidomo: Your request \"unsubscribe %s %s\"\n", address, listname);
+                if (MailStruct->Message_Id != NULL)
+                    fprintf(fh, "In-Reply-To: %s\n", MailStruct->Message_Id);
+                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");
+                CloseMailer(fh);
+                }
+            else
+                {
+                syslog(LOG_ERR, "Failed to send email to \"%s\" concerning his request.", originator);
+                return -1;
+                }
+
             return 0;
             }
 

CVSTrac 2.0.1