I got offline resolution with dnsmasq to work with
# /usr/local/etc/dnsmasq.conf
address=/.foobar/127.0.0.1
and # /etc/resolver/foobar
nameserver 127.0.0.1