El script funciona perfectamente, yo en mi caso he tenido que agregar fcgi pero funciona perfectamente, con un dominio demo que le he puesto.
bst:/# ping demo.com
PING demo.com (192.168.1.36) 56(84) bytes of data.
64 bytes from 192.168.1.36: icmp_seq=1 ttl=64 time=0.019 ms
64 bytes from 192.168.1.36: icmp_seq=2 ttl=64 time=0.012 ms
64 bytes from 192.168.1.36: icmp_seq=3 ttl=64 time=0.044 ms
^C
--- demo.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.012/0.025/0.044/0.013 ms
bst:/# ping webmail.demo.com
PING
http://www.demo.com (192.168.1.36) 56(84) bytes of data.
64 bytes from 192.168.1.36: icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from 192.168.1.36: icmp_seq=2 ttl=64 time=0.014 ms
64 bytes from 192.168.1.36: icmp_seq=3 ttl=64 time=0.046 ms
64 bytes from 192.168.1.36: icmp_seq=4 ttl=64 time=0.013 ms
^C
Logicamente resuelve a la webmail