I think you just reinvented the wheel here...
> ----------
> From: Balazs Nagy[SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 06, 1999 12:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PATCH] Resolving MAIL FROM domain
>
> Hiyas,
>
> Nowadays I just bored to get mail from illegal hostnames and I created a
> diff against vanilla qmail-1.03 (see attachment).
>
> It is simple. It checks for a DNS entry for the MAIL FROM domain if
> control/mfcheck or the MFCHECK environment variable is set to nonzero.
>
> Please check it out. Any comments/bugfixes/etc are welcomed.
> --
> Regards: Kevin (Balazs)
>
>