diff --git a/bin/vmail-aliases-get.sh b/bin/vmail-aliases-get.sh index 60eec50..93800fe 100755 --- a/bin/vmail-aliases-get.sh +++ b/bin/vmail-aliases-get.sh @@ -48,7 +48,7 @@ if [[ -n $alias ]]; then exit 1 fi elif [[ -n $email ]]; then - dbquery="$dbquery AND vm_aliases.alias='$mbox' AND vm_domains.domain='$domain'" + dbquery="$dbquery AND vm_mboxes.mbox='$mbox' AND vm_domains.domain='$domain'" elif [[ -n $domain ]]; then dbquery="$dbquery AND vm_domains.domain='$domain'" else