OSSP CVS Repository

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

ossp-pkg/petidomo/hermes.c 1.3 -> 1.4

--- hermes.c     2000/12/15 15:48:00     1.3
+++ hermes.c     2001/01/06 11:05:08     1.4
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
-   $Revision: 1.3 $
+   $Revision: 1.4 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -100,11 +100,11 @@
             if (fh != NULL) {
                 fprintf(fh, "From: %s (Petidomo Mailing List Server)\n", owner);
                 fprintf(fh, "To: %s\n", owner);
-                fprintf(fh, "Subject: Unauthorized posting to list \"%s\"\n", listname);
+                fprintf(fh, "Subject: Petidomo: BOUNCE %s@%s: Moderator approval required\n", listname, ListConfig->fqdn);
                 fprintf(fh, "Precedence: junk\n");
                 fprintf(fh, "Sender: %s\n", owner);
                 fprintf(fh, "\n");
-                fprintf(fh, "The following article was rejected:\n\n");
+                fprintf(fh, "The following posting requires your explicit approval:\n\n");
                 fprintf(fh, "%s\n", MailStruct->Header);
                 fprintf(fh, "%s", MailStruct->Body);
                 CloseMailer(fh);
@@ -124,11 +124,11 @@
                 if (fh != NULL) {
                     fprintf(fh, "From: %s (Petidomo Mailing List Server)\n", owner);
                     fprintf(fh, "To: %s\n", owner);
-                    fprintf(fh, "Subject: Unauthorized posting to list \"%s\"\n", listname);
+                    fprintf(fh, "Subject: Petidomo: BOUNCE %s@%s: Non-member submission from \"%s\"\n", listname, ListConfig->fqdn, MailStruct->From);
                     fprintf(fh, "Precedence: junk\n");
                     fprintf(fh, "Sender: %s\n", owner);
                     fprintf(fh, "\n");
-                    fprintf(fh, "The following article was rejected, because the sender\n" \
+                    fprintf(fh, "The following posting was rejected, because the sender\n" \
                             "\"%s\" is not subscribed to the list:\n\n", MailStruct->From);
                     fprintf(fh, "%s\n", MailStruct->Header);
                     fprintf(fh, "%s", MailStruct->Body);
@@ -235,6 +235,23 @@
     dst += len;
     *dst = '\0';
 
+    /* Add custom headers if there are some. */
+
+    buffer = text_easy_sprintf("lists/%s/header", listname);
+    if (stat(buffer, &sb) == 0)
+        {
+        char* p = loadfile(buffer);
+        if (p == NULL)
+            {
+            syslog(LOG_ERR, "Failed reading the header file for list \"%s\".", listname);
+            exit(1);
+            }
+        strcpy(dst, p);
+        dst += strlen(p);
+        free(p);
+        free(buffer);
+        }
+
     /* Add the signature if there is one. */
 
     buffer = text_easy_sprintf("lists/%s/signature", listname);

CVSTrac 2.0.1