Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/sendmail sendmail 8.11.0



details:   https://anonhg.NetBSD.org/src/rev/f1f28701d6f4
branches:  trunk
changeset: 495156:f1f28701d6f4
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 23 14:07:40 2000 +0000

description:
sendmail 8.11.0

diffstat:

 gnu/dist/sendmail/cf/ostype/darwin.m4        |   17 +++
 gnu/dist/sendmail/contrib/bitdomain.c        |    8 +-
 gnu/dist/sendmail/contrib/cidrexpand         |  137 +++++++++++++++++++++++++++
 gnu/dist/sendmail/contrib/link_hash.sh       |   36 +++++++
 gnu/dist/sendmail/contrib/movemail.conf      |   35 ++++++
 gnu/dist/sendmail/contrib/movemail.pl        |  106 ++++++++++++++++++++
 gnu/dist/sendmail/contrib/passwd-to-alias.pl |   13 +-
 gnu/dist/sendmail/contrib/re-mqueue.pl       |   32 +++++-
 gnu/dist/sendmail/contrib/smcontrol.pl       |    2 +-
 gnu/dist/sendmail/devtools/OS/SunOS.5.9      |   19 +++
 gnu/dist/sendmail/smrsh/Makefile.m4          |    3 +
 gnu/dist/sendmail/test/t_setuid.c            |    2 +-
 gnu/dist/sendmail/test/t_snprintf.c          |   24 ++++
 13 files changed, 416 insertions(+), 18 deletions(-)

diffs (truncated from 575 to 300 lines):

diff -r 9d2b174787cb -r f1f28701d6f4 gnu/dist/sendmail/cf/ostype/darwin.m4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/sendmail/cf/ostype/darwin.m4     Sun Jul 23 14:07:40 2000 +0000
@@ -0,0 +1,17 @@
+divert(-1)
+#
+# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+#      All rights reserved.
+#
+# By using this file, you agree to the terms and conditions set
+# forth in the LICENSE file which can be found at the top level of
+# the sendmail distribution.
+#
+#
+#
+
+divert(0)
+VERSIONID(`Id: darwin.m4,v 8.1.2.1 2000/06/15 06:37:04 gshapiro Exp')
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
+ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
+ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
diff -r 9d2b174787cb -r f1f28701d6f4 gnu/dist/sendmail/contrib/bitdomain.c
--- a/gnu/dist/sendmail/contrib/bitdomain.c     Sun Jul 23 10:41:35 2000 +0000
+++ b/gnu/dist/sendmail/contrib/bitdomain.c     Sun Jul 23 14:07:40 2000 +0000
@@ -51,7 +51,7 @@
 {
     int opt;
 
-    while ((opt = getopt(argc, argv, "o:")) != EOF) {
+    while ((opt = getopt(argc, argv, "o:")) != -1) {
        switch (opt) {
        case 'o':
            if (!freopen(optarg, "w", stdout)) {
@@ -187,7 +187,7 @@
            case NO_DATA:
                err = "registered in DNS, but not mailable";
                break;
-               
+
            default:
                err = "unknown nameserver error";
                break;
@@ -210,7 +210,7 @@
        int hbsize;
 {
        register u_char *eom, *ap;
-       register int n; 
+       register int n;
        HEADER *hp;
        querybuf answer;
        int ancount, qdcount;
@@ -406,4 +406,4 @@
        }
     }
 }
-           
+
diff -r 9d2b174787cb -r f1f28701d6f4 gnu/dist/sendmail/contrib/cidrexpand
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/sendmail/contrib/cidrexpand      Sun Jul 23 14:07:40 2000 +0000
@@ -0,0 +1,137 @@
+#!/usr/local/bin/perl -w
+
+# v 0.2-very-very-beta
+#
+# 17 July 2000 Derek J. Balling (dredd%megacity.org@localhost)
+#
+# The $SENDMAIL flag tells the code to lump networks in sendmail format
+# if applicable. If this flag is disabled, cidrexpand will literally create
+# a single line for each entry, which may or may not be what you want. :)
+# makes for a rather large hash table...
+#
+# Acts as a preparser on /etc/mail/access_db to allow you to use address/bit
+# notation. Caveat: the address portion MUST be the start address or your
+# results will NOT be what what you want.
+#
+#
+# usage:
+#  cidrexpand < /etc/mail/access | makemap hash /etc/mail/access
+#
+#
+# Report bugs to: dredd%megacity.org@localhost
+#
+
+my $spaceregex = '\s+';
+
+while (my $arg = shift @ARGV)
+{
+     if ($arg eq '-t')
+     {
+       $spaceregex = shift;
+     }
+}
+
+use strict;
+
+my $SENDMAIL = 1;
+
+while (<>)
+{
+     my ($left,$right,$space);
+
+     if (! /^(\d+\.){3}\d+\/\d\d?$spaceregex.*/ )
+     {
+       print;
+     }
+     else
+     {
+       ($left,$space,$right) = /^((?:\d+\.){3}\d+\/\d\d?)($spaceregex)(.*)$/;
+
+       my @new_lefts = expand_network($left);
+       foreach my $nl (@new_lefts)
+       {
+           print "$nl$space$right\n";
+       }
+
+     }
+}
+    
+sub expand_network
+{
+     my ($network,$mask) = split /\//, shift;
+     my @diffs = calc_changes($network,$mask);
+     my ($first,$second,$third,$fourth) = split /\./, $network;
+
+     my @rc = ();
+
+     for my $f ($first..($first+$diffs[0]))
+     {
+       if ( ( $SENDMAIL ) and ($diffs[1] == 255))
+       {
+           push @rc, "$f";
+       }
+       else
+       {
+           for my $s ($second..($second+$diffs[1]))
+           {
+               if ( ($SENDMAIL) and ($diffs[2] == 255) )
+               {
+                   push @rc,"$f\.$s";
+               }
+               else
+               {
+                   for my $t ($third..($third+$diffs[2]))
+                   {
+                       if ( ($SENDMAIL) and ($diffs[3] == 255))
+                       {
+                           push @rc, "$f\.$s\.$t";
+                       }
+                       else
+                       {
+                           for my $fr ($fourth..($fourth+$diffs[3]))
+                           {
+                               push @rc, "$f\.$s\.$t\.$fr";
+                           }
+                       }
+                   }
+               }
+           }
+       }
+     }
+     return @rc;
+}
+
+sub calc_changes
+{
+     my ($network,$mask) = @_;
+    
+     my @octs = split /\./, $network;
+    
+     my ($first,$second,$third,$fourth) = (0,0,0,0);
+    
+     my $power = 32 - $mask;
+    
+     if ($mask > 24)
+     {
+       $fourth = 2**$power - 1;
+     }
+     elsif ($mask > 16)
+     {
+       $fourth = 255;
+       $third = 2**($power-8) - 1;
+     }
+     elsif ($mask > 8)
+     {
+       $fourth = 255;
+       $third  = 255;
+       $second = 2**($power-16) - 1;
+     }
+     elsif ($mask > 0)
+     {
+       $fourth = 255;
+       $third = 255;
+       $second = 255;
+       $first = 2**($power-24) - 1;
+     }
+     return ($first,$second,$third,$fourth);
+}
diff -r 9d2b174787cb -r f1f28701d6f4 gnu/dist/sendmail/contrib/link_hash.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/sendmail/contrib/link_hash.sh    Sun Jul 23 14:07:40 2000 +0000
@@ -0,0 +1,36 @@
+#!/bin/sh
+##
+## Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+##       All rights reserved.
+##
+## Id: link_hash.sh,v 1.1.2.1 2000/04/25 00:10:47 ca Exp
+##
+#
+# ln a certificate to its hash
+#
+SSL=openssl
+if test $# -ge 1
+then
+  for i in $@
+  do
+  C=$i.pem
+  test -f $C || C=$i
+  if test -f $C
+  then
+    H=`$SSL x509 -noout -hash < $C`.0
+    if test -h $H -o -f $H
+    then
+      echo link $H to $C exists
+    else
+      ln -s $C $H
+    fi
+  else
+    echo "$0: cannot open $C"
+    exit 2
+  fi
+  done
+else
+  echo "$0: missing name"
+  exit 1
+fi
+exit 0
diff -r 9d2b174787cb -r f1f28701d6f4 gnu/dist/sendmail/contrib/movemail.conf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/sendmail/contrib/movemail.conf   Sun Jul 23 14:07:40 2000 +0000
@@ -0,0 +1,35 @@
+# Configuration script for movemail.pl
+
+my $minutes = 60;
+my $hours = 3600;
+
+# Queue directories first..last
+
+@queues = qw(
+       /var/spool/mqueue/q1
+       /var/spool/mqueue/q2
+       /var/spool/mqueue/q3
+);
+
+# Base of subqueue name (optional).
+# If used, queue directories are $queues[n]/$subqbase*
+# Separate qf/df/xf directories are not supported.
+
+$subqbase = "subq";
+
+# Age of mail when moved.  Each element of the array must be greater than the
+# previous element.
+
+@ages = (
+       30*$minutes,    # q1 to q2
+       6*$hours        # q2 to q3
+);
+
+# Location of script to move the mail
+
+$remqueue = "/usr/local/bin/re-mqueue.pl";
+
+# Lock file to prevent more than one instance running (optional)
+# Useful when running from cron
+
+$lockfile = "/var/spool/mqueue/movemail.lock";
diff -r 9d2b174787cb -r f1f28701d6f4 gnu/dist/sendmail/contrib/movemail.pl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/sendmail/contrib/movemail.pl     Sun Jul 23 14:07:40 2000 +0000
@@ -0,0 +1,106 @@
+#!/usr/bin/perl -w
+#
+# Move old mail messages between queues by calling re-mqueue.pl.
+#
+# movemail.pl [config-script]
+#
+# Default config script is /usr/local/etc/movemail.conf.
+#
+# Graeme Hewson <graeme.hewson%oracle.com@localhost>, June 2000
+#
+
+use strict;
+
+# Load external program as subroutine to avoid
+# compilation overhead on each call
+
+sub loadsub {
+    my $fn = shift
+       or die "Filename not specified";



Home | Main Index | Thread Index | Old Index