OSSP CVS Repository

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

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

--- hermes.c     2000/12/13 15:35:14     1.2
+++ hermes.c     2000/12/15 15:48:00     1.3
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
-   $Revision: 1.2 $
+   $Revision: 1.3 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -43,7 +43,6 @@
     int             rc, len, operation;
 
     assert(listname != NULL);
-    debug((DEBUG_HERMES, 5, "Received article for the \"%s\" mailing list", listname));
 
     /* Initialize internals. */
 
@@ -57,8 +56,6 @@
         exit(rc);
     }
 
-    debug((DEBUG_HERMES, 3, "Parsed incoming mail successfully."));
-
     /* Do sanity checks. */
 
     if (MailStruct->Envelope == NULL) {
@@ -87,8 +84,6 @@
 
     /* Check for authorization. */
 
-    debug((DEBUG_HERMES, 5, "Checking whether posting is authorized."));
-
     if (FindBodyPassword(MailStruct) != 0)
       exit(1);
 
@@ -125,9 +120,6 @@
         if (ListConfig->listtype == LIST_CLOSED) {
             /* Only subscribers may post */
             if (isSubscribed(listname, MailStruct->From, NULL, NULL, TRUE) == FALSE) {
-                debug((DEBUG_HERMES, 5, "\"%s\" is not a subscriber of \"%s\". Rejecting.",
-                       MailStruct->From, listname));
-
                 fh = vOpenMailer(envelope, owner, NULL);
                 if (fh != NULL) {
                     fprintf(fh, "From: %s (Petidomo Mailing List Server)\n", owner);
@@ -156,7 +148,6 @@
             exit(1);
         }
         rc = handleACL(MailStruct, listname, operation, parameter);
-        debug((DEBUG_HERMES, 8, "handleACL() returned %d.", rc));
         switch(rc) {
           case -1:
               syslog(LOG_ERR, "handleACL() failed with an error.");
@@ -166,18 +157,11 @@
           case 1:
               return 0;
         }
-
-        debug((DEBUG_HERMES, 3, "\"%s\" is authorized to post to \"%s\".",
-               MailStruct->From, listname));
-    }
-    else {
-        debug((DEBUG_HERMES, 5, "Listtype doesn't require authorization."));
     }
 
     /* Copy the desired headers from the original mail to our own
        buffer. */
 
-    debug((DEBUG_HERMES, 9, "Preparing headers for posting."));
     for(len = 0, currLine = MailStruct->Header, dst = PostingHeaders;
         *currLine != '\0';
         currLine = nextLine) {
@@ -205,7 +189,6 @@
             len = nextLine - currLine;
             memmove(dst, currLine, len);
             dst += len;
-            debug((DEBUG_HERMES, 9, "Copied line."));
         }
     }
 
@@ -255,19 +238,14 @@
     /* Add the signature if there is one. */
 
     buffer = text_easy_sprintf("lists/%s/signature", listname);
-    debug((DEBUG_HERMES, 6, "Checking whether \"%s\" exists.", buffer));
     if (stat(buffer, &sb) == 0) {
-        debug((DEBUG_HERMES, 3, "Appending signature \"%s\".", buffer));
         buffer = loadfile(buffer);
         if (buffer == NULL) {
             syslog(LOG_ERR, "Failed reading the signature file for list \"%s\".", listname);
             exit(1);
         }
         MailStruct->ListSignature = buffer;
-        debug((DEBUG_HERMES, 7, "Signature is: \"%s\".", buffer));
     }
-    else
-      debug((DEBUG_HERMES, 3, "No signature file \"%s\".", buffer));
 
     /* No more modifications will be made. Now copy the posting
        headers into the structure instead of the original ones. */
@@ -277,14 +255,12 @@
     /* Apply the posting filter. */
 
     if (ListConfig->postingfilter != NULL) {
-        debug((DEBUG_HERMES, 3, "Applying posting filter for list \"%s\".", listname));
         rc = MailFilter(MailStruct, ListConfig->postingfilter);
         if (rc != 0) {
             syslog(LOG_ERR, "Postingfilter \"%s\" returned error %d while processing posting " \
             "for list \"%s\".", ListConfig->postingfilter, rc, listname);
             exit(1);
         }
-        debug((DEBUG_HERMES, 6, "Filter was successful: returncode = %d.", rc));
     }
 
     /* Deliver the article to all recipients. */

CVSTrac 2.0.1