qregex includes two new control files; badmailfromnorelay and badmailtonorelay. These control files include patterns that are matched only when the RELAYCLIENT environment variable is not set. The included README.qregex file has more details. My qregex-starttls-2way-auth patch includes this new version of qregex. Follow the Downloads link and go to the qmail directory to get them.