The IPFW rules are really not the place for this. Your MTA will have built-in support for RBLs which is a much more appropriate place. For sendmail, see the "FEATURE(`dnsbl'...)", well, feature.