diff options
| author | fukachan <fukachan> | 2002-08-13 14:36:43 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-08-13 14:36:43 +0000 |
| commit | e191040fd7cb8c36b6f74fb7332c1bf45f5c9e56 (patch) | |
| tree | bec5fee863aebc5fcee760db0a2a3bbe20af5207 | |
| parent | a53f23ef9246336fdcad2ca05931c84bda68180d (diff) | |
| download | fml8-e191040fd7cb8c36b6f74fb7332c1bf45f5c9e56.tar.gz fml8-e191040fd7cb8c36b6f74fb7332c1bf45f5c9e56.tar.bz2 fml8-e191040fd7cb8c36b6f74fb7332c1bf45f5c9e56.zip | |
bug fix $fh-close() under defined($fh) is confirmed
use "postconf -d" to expand variables
| -rw-r--r-- | fml/lib/FML/MTAControl/Postfix.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fml/lib/FML/MTAControl/Postfix.pm b/fml/lib/FML/MTAControl/Postfix.pm index 3979aee5..822b707b 100644 --- a/fml/lib/FML/MTAControl/Postfix.pm +++ b/fml/lib/FML/MTAControl/Postfix.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Postfix.pm,v 1.7 2002/07/12 15:03:27 fukachan Exp $ +# $FML: Postfix.pm,v 1.8 2002/07/17 09:34:20 fukachan Exp $ # package FML::MTAControl::Postfix; @@ -155,11 +155,11 @@ sub postfix_find_key_in_alias_maps while (<$fh>) { return 1 if /^$key:/; } + $fh->close; } else { warn("cannot open $map"); } - $fh->close; } return 0; @@ -211,11 +211,11 @@ sub postfix_get_aliases_as_hash_ref $value =~ s/s*$//; $aliases->{ $key } = $value; } + $fh->close; } else { warn("cannot open $map"); } - $fh->close; } return $aliases; @@ -233,7 +233,7 @@ sub postfix_alias_maps my $config = $curproc->{ config }; my $prog = $config->{ path_postconf }; - my $maps = `$prog alias_maps`; + my $maps = `$prog -d alias_maps`; $maps =~ s/,/ /g; $maps =~ s/\s+hash:/ /g; $maps =~ s/\s+dbm:/ /g; |
