OSSP CVS Repository

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

Check-in Number: 210
Date: 2000-Dec-12 16:35:14 (local)
2000-Dec-12 15:35:14 (UTC)
User:simons
Branch:
Comment: - Added correct GNU GPL copyright statements to the files. - Removed unnecessary include statements.
Tickets:
Inspections:
Files:
ossp-pkg/petidomo/acl.y      1.1 -> 1.2     19 inserted, 9 deleted
ossp-pkg/petidomo/acl_scan.l      1.1 -> 1.2     17 inserted, 7 deleted
ossp-pkg/petidomo/archive.c      1.1 -> 1.2     19 inserted, 9 deleted
ossp-pkg/petidomo/authen.c      1.1 -> 1.2     19 inserted, 9 deleted
ossp-pkg/petidomo/config.c      1.1 -> 1.2     21 inserted, 11 deleted
ossp-pkg/petidomo/filter.c      1.1 -> 1.2     18 inserted, 8 deleted
ossp-pkg/petidomo/handleacl.c      1.1 -> 1.2     18 inserted, 9 deleted
ossp-pkg/petidomo/help.c      1.1 -> 1.2     19 inserted, 9 deleted
ossp-pkg/petidomo/hermes.c      1.1 -> 1.2     24 inserted, 10 deleted
ossp-pkg/petidomo/index.c      1.1 -> 1.2     19 inserted, 9 deleted
ossp-pkg/petidomo/io.c      1.1 -> 1.2     18 inserted, 8 deleted
ossp-pkg/petidomo/listserv.c      1.1 -> 1.2     23 inserted, 9 deleted
ossp-pkg/petidomo/mailer.c      1.1 -> 1.2     97 inserted, 73 deleted
ossp-pkg/petidomo/main.c      1.1 -> 1.2     40 inserted, 23 deleted
ossp-pkg/petidomo/members.c      1.1 -> 1.2     19 inserted, 9 deleted
ossp-pkg/petidomo/parsearray.c      1.1 -> 1.2     17 inserted, 7 deleted
ossp-pkg/petidomo/password.c      1.1 -> 1.2     18 inserted, 9 deleted
ossp-pkg/petidomo/rfcparse.c      1.1 -> 1.2     38 inserted, 10 deleted
ossp-pkg/petidomo/subscribe.c      1.1 -> 1.2     22 inserted, 10 deleted
ossp-pkg/petidomo/tool.c      1.1 -> 1.2     20 inserted, 10 deleted
ossp-pkg/petidomo/unsubscribe.c      1.1 -> 1.2     19 inserted, 9 deleted

ossp-pkg/petidomo/acl.y 1.1 -> 1.2

--- acl.y        2000/12/13 13:19:22     1.1
+++ acl.y        2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/acl.y,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:22 $
- *
- *      Copyright (C) 1997 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/acl.y,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 %{
         /* Definitions we need in the parser. */
@@ -16,8 +26,8 @@
 #include <sys/wait.h>
 #include <errno.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 static int yyerror(char *);
 static int yylex(void);


ossp-pkg/petidomo/acl_scan.l 1.1 -> 1.2

--- acl_scan.l   2000/12/13 13:19:22     1.1
+++ acl_scan.l   2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/Attic/acl_scan.l,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:22 $
- *
- *      Copyright (C) 1997 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/Attic/acl_scan.l,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 %{
 #include <ctype.h>


ossp-pkg/petidomo/archive.c 1.1 -> 1.2

--- archive.c    2000/12/13 13:19:22     1.1
+++ archive.c    2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/archive.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:22 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/archive.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <stdlib.h>
 #include <string.h>
@@ -14,8 +24,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 ArchiveMail(const struct Mail * MailStruct, const char * listname)


ossp-pkg/petidomo/authen.c 1.1 -> 1.2

--- authen.c     2000/12/13 13:19:22     1.1
+++ authen.c     2000/12/13 15:35:14     1.2
@@ -1,17 +1,27 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/authen.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:22 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/authen.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <string.h>
 #include <ctype.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 FindBodyPassword(struct Mail * MailStruct)


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

--- config.c     2000/12/13 13:19:22     1.1
+++ config.c     2000/12/13 15:35:14     1.2
@@ -1,20 +1,30 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/Attic/config.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:22 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/Attic/config.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 #include <pwd.h>
 
-#include <lists.h>
-#include <configfile.h>
-#include <petidomo.h>
+#include "liblists/lists.h"
+#include "libconfigfile/configfile.h"
+#include "petidomo.h"
 
 static struct PD_Config *  MasterConfig;
 List ListConfigs;
@@ -25,7 +35,7 @@
 static char *             fqdn = NULL;
 static char *             master_password = NULL;
 static char *             mta = "/usr/sbin/sendmail";
-static char *             mta_options = "-f%s";
+static char *             mta_options = "-i -f%s";
 static bool               detach = FALSE;
 static bool               show_stats = TRUE;
 


ossp-pkg/petidomo/filter.c 1.1 -> 1.2

--- filter.c     2000/12/13 13:19:23     1.1
+++ filter.c     2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/filter.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/filter.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <stdlib.h>
 #include <sys/wait.h>
@@ -14,7 +24,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#include <petidomo.h>
+#include "petidomo.h"
 
 #define READ 0
 #define WRITE 1


ossp-pkg/petidomo/handleacl.c 1.1 -> 1.2

--- handleacl.c  2000/12/13 13:19:23     1.1
+++ handleacl.c  2000/12/13 15:35:14     1.2
@@ -1,15 +1,24 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/handleacl.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/handleacl.c,v $
+   $Revision: 1.2 $
 
-#include <stdlib.h>
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
 
-#include <petidomo.h>
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
+
+#include <stdlib.h>
+#include "petidomo.h"
 
 /* Returncodes have the following meaning: '-1' == Error, '0' ==
    Proceed, '1' == Mail has been taken care of. */


ossp-pkg/petidomo/help.c 1.1 -> 1.2

--- help.c       2000/12/13 13:19:23     1.1
+++ help.c       2000/12/13 15:35:14     1.2
@@ -1,14 +1,24 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/help.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/help.c,v $
+   $Revision: 1.2 $
 
-#include <text.h>
-#include <petidomo.h>
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
+
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 SendHelp(struct Mail * MailStruct,


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

--- hermes.c     2000/12/13 13:19:23     1.1
+++ hermes.c     2000/12/13 15:35:14     1.2
@@ -1,18 +1,28 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
-#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <string.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 hermes_main(char * incoming_mail, const char * listname)
@@ -51,6 +61,10 @@
 
     /* Do sanity checks. */
 
+    if (MailStruct->Envelope == NULL) {
+        syslog(LOG_NOTICE, "Received mail without a valid envelope.");
+        return 0;
+    }
     if (MailStruct->From == NULL) {
         syslog(LOG_NOTICE, "Received mail without From: line.");
         return 0;


ossp-pkg/petidomo/index.c 1.1 -> 1.2

--- index.c      2000/12/13 13:19:23     1.1
+++ index.c      2000/12/13 15:35:14     1.2
@@ -1,19 +1,29 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/index.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/index.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 GenIndex(struct Mail * MailStruct,


ossp-pkg/petidomo/io.c 1.1 -> 1.2

--- io.c 2000/12/13 13:19:23     1.1
+++ io.c 2000/12/13 15:35:14     1.2
@@ -1,17 +1,27 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/io.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1997 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/io.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
 
-#include <petidomo.h>
+#include "petidomo.h"
 
 char *
 LoadFromDescriptor(int fd)


ossp-pkg/petidomo/listserv.c 1.1 -> 1.2

--- listserv.c   2000/12/13 13:19:23     1.1
+++ listserv.c   2000/12/13 15:35:14     1.2
@@ -1,17 +1,27 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/listserv.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:23 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/listserv.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <string.h>
 #include <ctype.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 char * g_currLine;              /* pointer to the line currently parsed */
 
@@ -45,6 +55,10 @@
 
     /* Do sanity checks. */
 
+    if (MailStruct->Envelope == NULL) {
+        syslog(LOG_NOTICE, "Received mail without a valid envelope.");
+        return 0;
+    }
     if (MailStruct->From == NULL) {
         syslog(LOG_NOTICE, "Received mail without From: line.");
         return 0;


ossp-pkg/petidomo/mailer.c 1.1 -> 1.2

--- mailer.c     2000/12/13 13:19:24     1.1
+++ mailer.c     2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/mailer.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:24 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/mailer.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <stdlib.h>
 #include <stdarg.h>
@@ -14,8 +24,8 @@
 #include <unistd.h>
 #include <ctype.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 #ifndef ARG_NUM_MAX
 #  define ARG_NUM_MAX 4096
@@ -26,22 +36,22 @@
 
 static char *
 my_strcpy(char * dst, const char * src)
-{
+    {
     while((*dst++ = *src++) != '\0')
-      ;
+        ;
     return dst-1;
-}
+    }
 
 FILE *
 OpenMailer(const char * envelope, const char * recipients[])
-{
+    {
     assert(1==0);
     return NULL;
-}
+    }
 
 FILE *
 vOpenMailer(const char * envelope, ...)
-{
+    {
     const struct PD_Config *   MasterConfig;
     va_list                    ap;
     FILE *                     fh;
@@ -79,28 +89,32 @@
     /* Copy the mta's options into the array, while replacing '%s'
        with the envelope. */
 
-    for (options = MasterConfig->mta_options; *options != '\0'; ) {
+    for (options = MasterConfig->mta_options; *options != '\0'; )
+        {
         debug((DEBUG_MAILER, 4, "Parsing '%c' character.", *options));
-        if (options[0] == '%' && options[1] == 's') {
+        if (options[0] == '%' && options[1] == 's')
+            {
             p = my_strcpy(p, envelope);
             *p++ = ' ';
             options += 2;
             break;
-        }
-        else {
+            }
+        else
+            {
             debug((DEBUG_MAILER, 4, "Wrote '%c' to aray.", *options));
             *p++ = *options++;
+            }
         }
-    }
     *p++ = ' ';
 
     /* Append the list of recipients. */
 
     va_start(ap, envelope);
-    while ((q = va_arg(ap, const char *)) != NULL) {
+    while ((q = va_arg(ap, const char *)) != NULL)
+        {
         p = my_strcpy(p, q);
         *p++ = ' ';
-    }
+        }
     p[-1] = '\0';
     va_end(ap);
 
@@ -108,35 +122,34 @@
 
     fh = popen(cmdline, "w");
     if (fh == NULL)
-      syslog(LOG_ERR, "Failed opening pipe to \"%s\": %m", cmdline);
+        syslog(LOG_ERR, "Failed opening pipe to \"%s\": %m", cmdline);
 
     free(cmdline);
     return fh;
-}
+    }
 
 
 int
 CloseMailer(FILE * fh)
-{
+    {
     return pclose(fh);
-}
-
+    }
 
 static int
 my_strlen(const char * p)
-{
+    {
     u_int  i;
     for (i = 0; *p && !isspace((int)*p); p++)
-      i++;
+        i++;
     return i;
-}
+    }
 
 #define MYPIPE_READ fildes[0]
 #define MYPIPE_WRITE fildes[1]
 
 int
 ListMail(const char * envelope, const char * listname, const struct Mail * MailStruct)
-{
+    {
     const struct PD_Config * MasterConfig = getMasterConfig();
     char **   arguments;
     u_int     arguments_num = 256;
@@ -164,11 +177,12 @@
     sprintf(buffer, "lists/%s/list", listname);
     listfile = loadfile(buffer);
     if (listfile == NULL)
-      return 1;
+        return 1;
 
     /* Now go into delivery loop until we're finished. */
 
-    for(counter = 0, currAddress = listfile; *currAddress != '\0'; counter = 0) {
+    for(counter = 0, currAddress = listfile; *currAddress != '\0'; counter = 0)
+        {
 
         /* Set up the call to the MTA, including options. */
 
@@ -176,86 +190,96 @@
         debug((DEBUG_MAILER, 5, "MTA is \"%s\".", arguments[0]));
         sprintf(buffer, MasterConfig->mta_options, envelope);
         debug((DEBUG_MAILER, 5, "MTA options are \"%s\".", buffer));
-        for (p = buffer, arguments[counter++] = buffer; *p != '\0'; p++) {
+        for (p = buffer, arguments[counter++] = buffer; *p != '\0'; p++)
+            {
             debug((DEBUG_MAILER, 9, "Left to parse: \"%s\".", p));
-            if (isspace((int)*p)) {
+            if (isspace((int)*p))
+                {
                 *p++ = '\0';
                 debug((DEBUG_MAILER, 9, "Left to parse: \"%s\".", p));
                 while(*p != '\0' && isspace((int)*p))
-                  p++;
+                    p++;
                 debug((DEBUG_MAILER, 9, "Left to parse: \"%s\".", p));
                 arguments[counter++] = p;
+                }
             }
-        }
         if (strlen(arguments[counter-1]) == 0)
-          counter--;
+            counter--;
 
         /* Append as many recipients as fit. */
 
-        for (address_byte = 0; *currAddress != '\0' ; currAddress = nextAddress) {
+        for (address_byte = 0; *currAddress != '\0' ; currAddress = nextAddress)
+            {
             nextAddress = text_find_next_line(currAddress);
             len = my_strlen(currAddress);
-            if (address_byte + len > max_address_byte) {
+            if (address_byte + len > max_address_byte)
+                {
                 debug((DEBUG_MAILER, 1, "Sending early, command line exceeds %d characters.", ARG_MAX));
                 break;
-            }
-            if (counter > ARG_NUM_MAX) {
+                }
+            if (counter > ARG_NUM_MAX)
+                {
                 debug((DEBUG_MAILER, 1, "Sending early, command line exceeds %d arguments.", ARG_NUM_MAX));
                 break;
-            }
+                }
             currAddress[len] = '\0';
             debug((DEBUG_MAILER, 8, "Address \"%s\" is %u byte long.", currAddress, len));
             address_byte += len;
             arguments[counter++] = currAddress;
-            if (counter+8 >= arguments_num) {
+            if (counter+8 >= arguments_num)
+                {
                 debug((DEBUG_MAILER, 1, "Enlarging internal array."));
                 arguments_num += 256;
                 arguments = realloc(arguments, (arguments_num+1) * sizeof(char *));
                 if (arguments == NULL)
-                  return -1;
+                    return -1;
+                }
             }
-        }
 
         /* Deliver the mail. */
 
         arguments[counter++] = NULL;
-        if (pipe(fildes) == -1) {
+        if (pipe(fildes) == -1)
+            {
             syslog(LOG_ERR, "Couldn't open a pipe to my child process: %m");
             return -1;
-        }
+            }
         child_pid = fork();
-        switch(child_pid) {
-          case 0:
-              /* Child */
-              close(MYPIPE_WRITE);
-              if (dup2(MYPIPE_READ, STDIN_FILENO) == -1) {
-                  syslog(LOG_ERR, "Child process couldn't read from pipe: %m");
-                  return -1;
-              }
-              close(MYPIPE_READ);
-              execv(MasterConfig->mta, arguments);
-              syslog(LOG_ERR, "Couldn't exec(\"%s\"): %m", MasterConfig->mta);
-              return -1;
-          case -1:
-              /* Error */
-              syslog(LOG_ERR, "Couldn't fork: %m");
-              return -1;
-          default:
-              /* everything is fine */
-              close(MYPIPE_READ);
-        }
+        switch(child_pid)
+            {
+            case 0:
+                /* Child */
+                close(MYPIPE_WRITE);
+                if (dup2(MYPIPE_READ, STDIN_FILENO) == -1)
+                    {
+                    syslog(LOG_ERR, "Child process couldn't read from pipe: %m");
+                    return -1;
+                    }
+                close(MYPIPE_READ);
+                execv(MasterConfig->mta, arguments);
+                syslog(LOG_ERR, "Couldn't exec(\"%s\"): %m", MasterConfig->mta);
+                return -1;
+            case -1:
+                /* Error */
+                syslog(LOG_ERR, "Couldn't fork: %m");
+                return -1;
+            default:
+                /* everything is fine */
+                close(MYPIPE_READ);
+            }
         write(MYPIPE_WRITE, MailStruct->Header, strlen(MailStruct->Header));
         write(MYPIPE_WRITE, "\n", 1);
         write(MYPIPE_WRITE, MailStruct->Body, strlen(MailStruct->Body));
         if (MailStruct->ListSignature != NULL)
-          write(MYPIPE_WRITE, MailStruct->ListSignature, strlen(MailStruct->ListSignature));
+            write(MYPIPE_WRITE, MailStruct->ListSignature, strlen(MailStruct->ListSignature));
         close(MYPIPE_WRITE);
         waitpid(child_pid, &child_status, 0);
-        if (!(WIFEXITED(child_status) && WEXITSTATUS(child_status) == 0)) {
+        if (!(WIFEXITED(child_status) && WEXITSTATUS(child_status) == 0))
+            {
             syslog(LOG_ERR, "The executed mail agent return error %d, aborting.",
-                WEXITSTATUS(child_status));
+                   WEXITSTATUS(child_status));
             return -1;
+            }
         }
-    }
     return 0;
-}
+    }


ossp-pkg/petidomo/main.c 1.1 -> 1.2

--- main.c       2000/12/13 13:19:24     1.1
+++ main.c       2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:24 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/main.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <stdio.h>
 #include <sys/stat.h>
@@ -13,9 +23,7 @@
 #include <fcntl.h>
 #include <string.h>
 
-#include <argv.h>
-#include <petidomo.h>
-#include "version.h"
+#include "petidomo.h"
 
 #ifndef LOG_PERROR
 #  define LOG_PERROR 0
@@ -23,20 +31,22 @@
 
 MODULE_TABLE                    /* defined in debug.h */
 static char *        listname = NULL;
+#ifdef DEBUG
 static argv_array_t  debug;
+#endif
 
 int
 main(int argc, char * argv[])
-{
+    {
     const struct PD_Config * MasterConfig;
     char *        incoming_mail;
     char *        programname;
     argv_t        args[] = {
 #ifdef DEBUG
-        {'d', "debug", ARGV_CHARP | ARGV_ARRAY , &debug, "debug",
+        {'d', "debug", ARGV_CHAR_P | ARGV_FLAG_ARRAY , &debug, "debug",
          "Set debug level per module."},
 #endif
-        {ARGV_MAYBE, 0L, ARGV_CHARP, &listname, "listname", "Default mailing list."},
+        {ARGV_MAYBE, 0L, ARGV_CHAR_P, &listname, "listname", "Default mailing list."},
         {ARGV_LAST}
     };
     int           fd;
@@ -69,8 +79,8 @@
 
     /* Parse the command line. */
 
-    argv_help_string = "Petidomo Mailing List Server";
-    argv_version_string = VERS;
+    argv_help_string = "OpenPetidomo Mailing List Server";
+    argv_version_string = "OpenPetidomo";
     argv_process(args, argc, argv);
 
     /* Set debug level according to the wishes of the user. */
@@ -125,22 +135,29 @@
     /* Now decide what we actually do with the mail. */
 
     if (strcasecmp("listserv", programname) == 0)
-      listserv_main(incoming_mail, listname);
-    else if (strcasecmp("hermes", programname) == 0) {
+        listserv_main(incoming_mail, listname);
+    else if (strcasecmp("hermes", programname) == 0)
+        {
         if (listname != NULL)
-          hermes_main(incoming_mail, listname);
-        else {
+            hermes_main(incoming_mail, listname);
+        else
+            {
             syslog(LOG_ERR, "Wrong command line syntax. \"hermes\" requires a parameter.");
             exit(1);
+            }
         }
-    }
-    else {
+    else if (strcasecmp("petidomo", programname) == 0)
+        {
+        /* do nothing */
+        }
+    else
+        {
         syslog(LOG_ERR, "I have been called under an unknown name \"%s\".", programname);
         exit(1);
-    }
+        }
 
     /* Exit gracefully. */
 
     RemoveRescueMail();
     return 0;
-}
+    }


ossp-pkg/petidomo/members.c 1.1 -> 1.2

--- members.c    2000/12/13 13:19:24     1.1
+++ members.c    2000/12/13 15:35:14     1.2
@@ -1,19 +1,29 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/members.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:24 $
- *
- *      Copyright (C) 1997 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/members.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <ctype.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 SendSubscriberList(struct Mail * MailStruct,


ossp-pkg/petidomo/parsearray.c 1.1 -> 1.2

--- parsearray.c 2000/12/13 13:19:24     1.1
+++ parsearray.c 2000/12/13 15:35:14     1.2
@@ -1,11 +1,21 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/parsearray.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:24 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/parsearray.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include "petidomo.h"
 


ossp-pkg/petidomo/password.c 1.1 -> 1.2

--- password.c   2000/12/13 13:19:24     1.1
+++ password.c   2000/12/13 15:35:14     1.2
@@ -1,15 +1,24 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/password.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:24 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/password.c,v $
+   $Revision: 1.2 $
 
-#include <ctype.h>
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
 
-#include <petidomo.h>
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
+
+#include <ctype.h>
+#include "petidomo.h"
 
 static const char * s_password = NULL;
 extern char *       g_currLine;


ossp-pkg/petidomo/rfcparse.c 1.1 -> 1.2

--- rfcparse.c   2000/12/13 13:19:24     1.1
+++ rfcparse.c   2000/12/13 15:35:14     1.2
@@ -1,19 +1,29 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/rfcparse.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:24 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/rfcparse.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 
-#include <rfc822.h>
-#include <text.h>
-#include <petidomo.h>
+#include "librfc822/rfc822.h"
+#include "libtext/text.h"
+#include "petidomo.h"
 
 void
 RemoveCarrigeReturns(char * buffer)
@@ -343,6 +353,24 @@
               MailStruct->Subject += 1;
             debug((DEBUG_RFCPARSE, 5, "Subject: is \"%s\".", MailStruct->Subject));
         }
+        else if (strncasecmp("Sender:", currLine, strlen("Sender:")) == 0) {
+            if (MailStruct->Envelope != NULL)
+              syslog(LOG_NOTICE, "Received mail with multiple sender addresses.");
+            MailStruct->Envelope = &currLine[strlen("Sender:")];
+            if (*MailStruct->Envelope == ' ')
+              MailStruct->Envelope += 1;
+            debug((DEBUG_RFCPARSE, 5, "Sender: is \"%s\".", MailStruct->Envelope));
+        }
+        else if (strncasecmp("Return-Path:", currLine, strlen("Return-Path:")) == 0 &&
+                 MailStruct->Envelope == NULL)
+        {
+            if (MailStruct->Envelope != NULL)
+              syslog(LOG_NOTICE, "Received mail with multiple sender addresses.");
+            MailStruct->Envelope = &currLine[strlen("Return-Path:")];
+            if (*MailStruct->Envelope == ' ')
+              MailStruct->Envelope += 1;
+            debug((DEBUG_RFCPARSE, 5, "Return-Path: is \"%s\".", MailStruct->Envelope));
+        }
     }
 
     *result = MailStruct;


ossp-pkg/petidomo/subscribe.c 1.1 -> 1.2

--- subscribe.c  2000/12/13 13:19:25     1.1
+++ subscribe.c  2000/12/13 15:35:14     1.2
@@ -1,15 +1,25 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:25 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/subscribe.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <string.h>
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 AddAddress(struct Mail * MailStruct,
@@ -18,6 +28,7 @@
                 const char * defaultlist)
 {
     const struct List_Config * ListConfig;
+    const struct PD_Config   * MasterConfig;
     FILE *         fh;
     const char *   address = NULL;
     const char *   listname = NULL;
@@ -58,7 +69,7 @@
     }
 
     /* Initialize internal stuff. */
-
+    MasterConfig = getMasterConfig();
     ListConfig = getListConfig(listname);
     sprintf(owner, "%s-owner@%s", listname, ListConfig->fqdn);
     sprintf(envelope, "%s-owner@%s", listname, ListConfig->fqdn);
@@ -322,3 +333,4 @@
     }
     return 0;
 }
+


ossp-pkg/petidomo/tool.c 1.1 -> 1.2

--- tool.c       2000/12/13 13:19:25     1.1
+++ tool.c       2000/12/13 15:35:14     1.2
@@ -1,19 +1,29 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/tool.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:25 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/tool.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
 #include <string.h>
 
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 bool
 isSubscribed(const char * listname, const char * address,
@@ -57,7 +67,7 @@
         }
     }
 
-#if DEBUG
+#ifdef DEBUG
     if (*p != '\0') {
         debug((DEBUG_COMMAND, 3, "Found address: \"%s\".", p));
     }


ossp-pkg/petidomo/unsubscribe.c 1.1 -> 1.2

--- unsubscribe.c        2000/12/13 13:19:25     1.1
+++ unsubscribe.c        2000/12/13 15:35:14     1.2
@@ -1,15 +1,25 @@
 /*
- *      $Source: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v $
- *      $Revision: 1.1 $
- *      $Date: 2000/12/13 13:19:25 $
- *
- *      Copyright (C) 1996 by CyberSolutions GmbH.
- *      All rights reserved.
- */
+   $Source: /v/ossp/cvs/ossp-pkg/petidomo/unsubscribe.c,v $
+   $Revision: 1.2 $
+
+   Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+   This file is part of OpenPetidomo.
+
+   OpenPetidomo is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   OpenPetidomo is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+*/
 
 #include <string.h>
-#include <text.h>
-#include <petidomo.h>
+#include "libtext/text.h"
+#include "petidomo.h"
 
 int
 DeleteAddress(struct Mail * MailStruct,

CVSTrac 2.0.1