result incorrect "none" when the correct is "fail" --------------------------------------------------
Key: JSPF-23 URL: http://issues.apache.org/jira/browse/JSPF-23 Project: jSPF Issue Type: Bug Affects Versions: 0.9b2 Environment: linux suse, java 1.5 Reporter: Guillermo Grandes Attachments: jSPF-test.zip A little example: java -cp .:../lib/log4j-1.2.13.jar:../lib/jspf-0.9b2.jar:../lib/dnsjava-2.0.2.jar org.apache.james.jspf.SPFQuery -ip=212.9.65.11 [EMAIL PROTECTED] -helo=pepe Response: none Received-SPF: none (spfCheck: 212.9.65.11 is neither permitted nor denied by domain of datagrama.net) client-ip=212.9.65.11; [EMAIL PROTECTED]; helo=pepe; This is not correct, the SPF for domain "datagrama.net" is: "v=spf1 ip4:212.9.65.111 ip4:212.9.65.112 mx ptr a:smtp.datagrama.net a:smtp-n1.datagrama.net a:smtp-n2.datagrama.net a:smtp-out.datagrama.net a:fallback-relay.datagrama.net a:smtp01.datagrama.net -all" If use the Perl implementation of SPF, the result is: perl -MMail::SPF::Query -le 'print for Mail::SPF::Query->new(ipv4 => "212.9.65.11", sender => "[EMAIL PROTECTED]",helo => "pepe")->result' result: fail header_comment: fast1.local: domain of [EMAIL PROTECTED] does not designate 212.9.65.11 as permitted sender spf_record: v=spf1 ip4:212.9.65.111 ip4:212.9.65.112 mx ptr a:smtp.datagrama.net a:smtp-n1.datagrama.net a:smtp-n2.datagrama.net a:smtp-out.datagrama.net a:fallback-relay.datagrama.net a:smtp01.datagrama.net -all For test, attach 3 files in a zip, traza.log (trace logs), log4j.properties, jSPF-test.bsh (bean-shell) Needed jars: log4j-1.2.13.jar jspf-0.9b2.jar dnsjava-2.0.2.jar bsh-2.0b4.jar (http://www.beanshell.org/bsh-2.0b4.jar) Command for test (that generate debug-logs): ./jSPF-test.bsh -Dip=212.9.65.11 -Dmail='[EMAIL PROTECTED]' -Dhelo=pepe A cut from trace-log: 315 [main] DEBUG org.apache.james.jspf.SPF - Start PTR-Record lookup for : 212.9.65.11 323 [main] WARN org.apache.james.jspf.SPF - No PTRRecord found for: 212.9.65.11 org.apache.james.jspf.exceptions.NoneException: No PTRRecord found for: 212.9.65.11 at org.apache.james.jspf.DNSServiceXBillImpl.getPTRRecords(DNSServiceXBillImpl.java:363) at org.apache.james.jspf.terms.PTRMechanism.run(PTRMechanism.java:62) at org.apache.james.jspf.core.Directive.run(Directive.java:47) at org.apache.james.jspf.SPF.checkSPF(SPF.java:189) at org.apache.james.jspf.SPF.checkSPF(SPF.java:98) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHVariableDeclarator.eval(Unknown Source) at bsh.BSHTypedVariableDeclaration.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.source(Unknown Source) at bsh.Interpreter.main(Unknown Source) 325 [main] INFO org.apache.james.jspf.SPF - [ipAddress=212.9.65.11] [EMAIL PROTECTED] [helo=pepe] => none Many thanks! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]