diff options
-rwxr-xr-x | fripost-searchalias | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fripost-searchalias b/fripost-searchalias index 719cd01..65f1d4b 100755 --- a/fripost-searchalias +++ b/fripost-searchalias @@ -139,15 +139,10 @@ sub perform_search { my $f = $conf->{from}; my $g = $conf->{goto}; -my $from ||= $f || not $f && not $g; -my $goto ||= $g || not $f && not $g; +my $from = $f || !$f && !$g; +my $goto = $g || !$f && !$g; -if ($g) { - say " Searchin 'goto'"; - perform_search(goto => $ARGV[0]); -} - -if ($f) { +if ($from) { say " Searchin 'from'"; perform_search(address => $ARGV[0]); @@ -157,6 +152,11 @@ if ($f) { or die "Error: Unknown domain `$d'.\n"; } +if ($goto) { + say " Searchin 'goto'"; + perform_search(goto => $ARGV[0]); +} + $ldap->unbind(); |