[
https://issues.apache.org/jira/browse/JSPF-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869279#comment-17869279
]
Benoit Tellier commented on JSPF-112:
-------------------------------------
Hello,
I proposed https://github.com/apache/james-jspf/pull/24 wich adressed the issue.
The timeout was not correctly recognised, and was not leading to a proper
Timeout exception (maybe some dnsJava changes) and the default error handling
hanged.
THis PR:
- Fixes default error handling
- And recognise correctly the aforementioned issue as a timeout
I would be grateful if you could give that code change a try and confirm this
fixes the issues.
Best regards,
Benoit
> Bug: SPF Check Hangs Indefinitely in
> org.apache.james.jspf:apache-jspf-resolver:1.0.4
> -------------------------------------------------------------------------------------
>
> Key: JSPF-112
> URL: https://issues.apache.org/jira/browse/JSPF-112
> Project: James jSPF
> Issue Type: Bug
> Components: Core
> Environment: WIN SERVER 2016, JAVA 17.0.10
> Reporter: HABA
> Priority: Blocker
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When performing an SPF check using
> org.apache.james.jspf:apache-jspf-resolver:1.0.4, the process hangs
> indefinitely during the DNS resolution phase. The issue is observed with the
> following SPF check:
> {code:java}
> String spfResult = new
> DefaultSPF().checkSPF("207.54.72.202","[email protected]","esa13.hc437-5.eu.iphmx.com").getResult();{code}
> The log indicates the process gets stuck at the A-Record lookup for the
> domain 207.54.72.202.spf.hc210-93.eu.iphmx.com, with repeated debug messages
> until it eventually times out after multiple hours:
> {code:java}
> [ForkJoinPool.commonPool-worker-1] DEBUG
> org.apache.james.jspf.core.MacroExpand -- Domain expanded:
> 207.54.72.202.spf.hc210-93.eu.iphmx.com
> [ForkJoinPool.commonPool-worker-1] DEBUG
> org.apache.james.jspf.impl.DNSServiceXBillImpl -- Start A-Record lookup for :
> 207.54.72.202.spf.hc210-93.eu.iphmx.com
> [ForkJoinPool.commonPool-worker-1] DEBUG org.xbill.DNS.ExtendedResolver --
> Sending 207.54.72.202.spf.hc210-93.eu.iphmx.com./A, id=20803 to resolver 0
> (SimpleResolver [/X.X.X.X:53]), attempt 1 of 3
> [ForkJoinPool.commonPool-worker-1] DEBUG org.xbill.DNS.SimpleResolver --
> Sending 207.54.72.202.spf.hc210-93.eu.iphmx.com./A, id=20803 to udp/X.X.X.X:53
> [ForkJoinPool.commonPool-worker-1] DEBUG org.xbill.DNS.Cache -- Caching
> NXDOMAIN for 207.54.72.202.spf.hc210-93.eu.iphmx.com./A{code}
> This issue does not occur with version 1.0.3, where the SPF check completes
> successfully.
> *Steps to Reproduce:*
> Use org.apache.james.jspf:apache-jspf-resolver:1.0.4.
> Perform the SPF check with the provided code snippet.
> Observe the logs and notice the process getting stuck at the DNS
> resolution step.
> *Expected Result:*
> The SPF check should complete without hanging, as it does in version 1.0.3.
> *Actual Result:*
> The SPF check hangs indefinitely during DNS resolution, eventually timing out
> after several hours.{*}{*}
> *Version:* org.apache.james.jspf:apache-jspf-resolver:1.0.4
> *Previous Working Version:*
> org.apache.james.jspf:apache-jspf-resolver:1.0.3
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]