diff options
author | Peter Wemm <peter@FreeBSD.org> | 1997-08-04 05:00:07 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1997-08-04 05:00:07 +0000 |
commit | e54babdf0c067b521dc066286e05db2ab1add3df (patch) | |
tree | 3c16228d674b46f5459461ac48876de4f2e21e95 /usr.sbin/sendmail/contrib | |
parent | f3a1fc342b4423150f71e23e50f24d073a6d238b (diff) |
Notes
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 6dfafaa898d34..1e2cba9177ce9 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 b2bbab541f86d..05a51b93496fb 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"; |