diff --git a/bin/vmail-forwards-get.sh b/bin/vmail-forwards-get.sh index 947a1d7..c4b2cf3 100755 --- a/bin/vmail-forwards-get.sh +++ b/bin/vmail-forwards-get.sh @@ -42,7 +42,7 @@ if [[ -n $forward ]]; then dbquery="$dbquery AND vm_forwards.forward_to='$mbox@$domain'" elif [[ -n $domain ]]; then # add specific domain - dbquery="$dbquery vm_domains.domain='$domain'" + dbquery="$dbquery AND vm_domains.domain='$domain'" if [[ -n "$mbox" ]]; then # search for forward for specific email address dbquery="$dbquery AND vm_mboxes.mbox='$mbox'"