2010/3/15 <[email protected]>: > First question: when running an SPF check with jSPF using the DefaultSPF > checker method checkSPF(ip, address, helo) and receiving an SPFResult > object, it doesn't look like there is a way to distinguish between a "NONE" > result because the domain doesn't exist, and "NONE" because the domain has > no SPF/TXT record. I'm sure that's correct/good for SPF checking in general, > but any chance of that feature being added some day? I tried to figure out > how to subclass SPF.java to do it, but gave up eventually... maybe there is > a way to just subclass and expose a little more data? Any tips are welcome.
As the SPF spec does not require different behaviour for the 2 cases we didn't bothered to differentiate them. Architecturally speaking that information is only available in the DNSService service (for which we have 3 implementations) and the service interface does not expose this difference. >From a fast review of the code it won't be easy to alter it to return that >info. You better run your lookup to check if the domain exists or not if you really need that info. Otherwise you could alter the contract for DNSService to return null on missing domain and empty list on missing records, but then you will also have to alter all of the callers to support this and find a way to differentiate the result (hard). Another option is to write your own DNSService implementation: see LoggingDNSService for an example. Writing your own implementation will also let you lookup the parent domain when the main domain doesn't exists (I discourage you from doing this, but if you know your way I won't stop you....) Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
