help with script

Payal Rathod <[email protected]> Mon, 18 Jul 2005 04:51:21 -0400
Newsgroups gmane.comp.sysutils.bgware
Message-ID <[email protected]>
Hi,
I have a small script which disallows local mails to go over internet.
#!/bin/sh
if grep -q designs.local <<< $QMAILRCPTS && [[ "$QMAILHOST" != "designs.local" ]]
then
		exit 31
fi

But it does not work as expected. Can anyone tell why?
What is wrong in the script?

With warm regards,
-Payal