diff options
| author | fukachan <fukachan> | 2002-07-17 09:34:20 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-07-17 09:34:20 +0000 |
| commit | f8840de60f33463aefd503cb5f8f420d16e8e608 (patch) | |
| tree | 9b2f3bc6a7876d9af0a2b20b325d89b6012b02f9 | |
| parent | af02cc11d928352d0addfe0cb0dbe8bee832eadd (diff) | |
| download | fml8-f8840de60f33463aefd503cb5f8f420d16e8e608.tar.gz fml8-f8840de60f33463aefd503cb5f8f420d16e8e608.tar.bz2 fml8-f8840de60f33463aefd503cb5f8f420d16e8e608.zip | |
search only hash:, dbm: types in postfix alias_maps
| -rw-r--r-- | fml/lib/FML/MTAControl/Postfix.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fml/lib/FML/MTAControl/Postfix.pm b/fml/lib/FML/MTAControl/Postfix.pm index ac89c9b0..3979aee5 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.6 2002/06/30 14:30:15 fukachan Exp $ +# $FML: Postfix.pm,v 1.7 2002/07/12 15:03:27 fukachan Exp $ # package FML::MTAControl::Postfix; @@ -186,9 +186,15 @@ sub postfix_get_aliases_as_hash_ref $maps = [ $alias_file ]; } + MAP: for my $map (@$maps) { print STDERR "scan key = $key, map = $map\n" if $debug; + if ($map =~ /^\w+:/) { + print STDERR "* ignored $map\n"; + next MAP; + } + use FileHandle; my $fh = new FileHandle $map; if (defined $fh) { @@ -227,12 +233,12 @@ sub postfix_alias_maps my $config = $curproc->{ config }; my $prog = $config->{ path_postconf }; - my $maps = `$prog alias_maps`; $maps =~ s/,/ /g; - $maps =~ s/\s+\w+:/ /g; + $maps =~ s/\s+hash:/ /g; + $maps =~ s/\s+dbm:/ /g; $maps =~ s/^.*=\s*//; - chomp $maps; + $maps =~ s/[\s\n]*$//; my (@maps) = split(/\s+/, $maps); return \@maps; |
