diff options
author | peter <peter@FreeBSD.org> | 1997-08-04 05:00:07 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-08-04 05:00:07 +0000 |
commit | 8c3e83c7fe52ef0b5409cba7a9fca4a4eee555a7 (patch) | |
tree | f8183f23217c7a3d8af6056c035b3935eecbb5c2 /usr.sbin/sendmail/contrib | |
parent | 30e5ecc749b0dfb6f042838693feb42341c30413 (diff) | |
download | FreeBSD-src-8c3e83c7fe52ef0b5409cba7a9fca4a4eee555a7.zip FreeBSD-src-8c3e83c7fe52ef0b5409cba7a9fca4a4eee555a7.tar.gz |
Import sendmail-8.8.7 onto vendor branch.
Obtained from: ftp.sendmail.org
Diffstat (limited to 'usr.sbin/sendmail/contrib')
-rwxr-xr-x | usr.sbin/sendmail/contrib/etrn.pl | 12 | ||||
-rw-r--r-- | usr.sbin/sendmail/contrib/passwd-to-alias.pl | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/sendmail/contrib/etrn.pl b/usr.sbin/sendmail/contrib/etrn.pl index 6dfafaa..1e2cba9 100755 --- a/usr.sbin/sendmail/contrib/etrn.pl +++ b/usr.sbin/sendmail/contrib/etrn.pl @@ -70,6 +70,7 @@ $debug = $opt_d; $server = shift(@ARGV); @hosts = @ARGV; die $usage unless $server; +@cwfiles = (); if (!@hosts) { push(@hosts,$hostname); @@ -82,6 +83,12 @@ if (!@hosts) { chop($cwfile); $optional = /^Fw-o/; $cwfile =~ s,^Fw[^/]*,,; # extract the file name + + if (-r $cwfile) { + push (@cwfiles, $cwfile); + } else { + die "$cwfile is not readable" unless $optional; + } } if (/^Cw(.*)$/){ # look for a line starting with "Cw" @cws = split (' ', $1); @@ -93,17 +100,18 @@ if (!@hosts) { } close(CF); - if ($cwfile){ + for $cwfile (@cwfiles) { $0 = "$av0 - reading $cwfile"; if (open(CW, "<$cwfile")){ while (<CW>){ + next if /^\#/; $thishost = $_; chop($thishost); push(@hosts, $thishost) unless $thishost =~ $hostname; } close(CW); } else { - die "open $cwfile: $!" unless $optional; + die "open $cwfile: $!"; } } } diff --git a/usr.sbin/sendmail/contrib/passwd-to-alias.pl b/usr.sbin/sendmail/contrib/passwd-to-alias.pl index b2bbab5..05a51b9 100644 --- a/usr.sbin/sendmail/contrib/passwd-to-alias.pl +++ b/usr.sbin/sendmail/contrib/passwd-to-alias.pl @@ -18,7 +18,9 @@ while (@a = getpwent) { } $fullname =~ s/\.*[ _]+\.*/./g; - if ($fullname =~ /^[a-zA-Z]+(\.[a-zA-Z]+)+$/) { + $fullname =~ tr [åäöÅÄÖé] [aaoAAOe]; # <hakan@af.lu.se> 1997-06-15 + if ($fullname =~ /^[a-zA-Z][a-zA-Z-]+(\.[a-zA-Z][a-zA-Z-]+)+$/) { +# if ($fullname =~ /^[a-zA-Z]+(\.[a-zA-Z]+)+$/) { # Kari E. Hurtta print "$fullname: $name\n"; } else { print "# $fullname: $name\n"; |