OSSP CVS Repository

ossp - Difference in ossp-pkg/petidomo/hermes.c versions 1.14 and 1.15
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/petidomo/hermes.c 1.14 -> 1.15

--- hermes.c     2001/01/19 14:56:33     1.14
+++ hermes.c     2001/01/19 16:02:22     1.15
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
-   $Revision: 1.14 $
+   $Revision: 1.15 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -179,16 +179,17 @@
             /* Every posting needs an acknowledgement. */
 
             char* cookie;
+            char* originator = (MailStruct->Reply_To) ? MailStruct->Reply_To : MailStruct->From;
 
             syslog(LOG_NOTICE, "\"%s\" tried to post to acknowledged list \"%s\"; posting " \
                    "has been deferred.", MailStruct->From, listname);
 
             cookie = queue_posting(MailStruct, listname);
-            fh = vOpenMailer(owner, MailStruct->Envelope, NULL);
+            fh = vOpenMailer(owner, originator, NULL);
             if (fh != NULL)
                 {
                 fprintf(fh, "From: petidomo-approve@%s (Petidomo Mailing List Server)\n", ListConfig->fqdn);
-                fprintf(fh, "To: %s\n", MailStruct->Envelope);
+                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, "Precedence: junk\n");
                 fprintf(fh, "Sender: %s\n", owner);
@@ -227,9 +228,10 @@
                 }
             else
                 {
+                char* originator = (MailStruct->Reply_To) ? MailStruct->Reply_To : MailStruct->From;
                 rc = is_address_on_list(ListConfig->ack_file, MailStruct->From);
-                if (rc == 0)
-                    rc = is_address_on_list(ListConfig->ack_file, MailStruct->Envelope);
+                if (rc == 0 && MailStruct->Reply_To)
+                    rc = is_address_on_list(ListConfig->ack_file, MailStruct->Reply_To);
                 if (rc < 0)
                     {
                     syslog(LOG_ERR, "Can't verify whether address \"%s\" needs to be acknowledged or not.", MailStruct->From);
@@ -243,11 +245,11 @@
                            "for the first time; posting has been deferred.", MailStruct->From, listname);
 
                     cookie = queue_posting(MailStruct, listname);
-                    fh = vOpenMailer(owner, MailStruct->Envelope, NULL);
+                    fh = vOpenMailer(owner, originator, NULL);
                     if (fh != NULL)
                         {
                         fprintf(fh, "From: petidomo-approve@%s (Petidomo Mailing List Server)\n", ListConfig->fqdn);
-                        fprintf(fh, "To: %s\n", MailStruct->Envelope);
+                        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, "Precedence: junk\n");

CVSTrac 2.0.1