i guess this should be the right syntax ... if not ... feel free to correct
user = grom-user
password = password
hosts = 127.0.0.1
dbname = grommunio
query = SELECT 1 FROM domains WHERE domain_status=0 AND domainname='%s'
activate in postfix with
postconf virtual_mailbox_domains=mysql:/etc/postfix/grommunio-virtual-mailbox-domains.cf
check if ok whe you return 1
postmap -q domain.tld mysql:/etc/postfix/grommunio-virtual-mailbox-domains.cf