} catch (NeutralException e) {
throw new PermErrorException("included checkSPF returned NeutralException");
}
if (spfData.getCurrentResult() == null) {
throw new TempErrorException("included checkSPF returned null");
} else if (spfData.getCurrentResult().equals(SPF1Constants.PASS)) {
return true;
} else if (spfData.getCurrentResult().equals(SPF1Constants.FAIL) || spfData.getCurrentResult().equals(SPF1Constants.SOFTFAIL) || spfData.getCurrentResult().equals(SPF1Constants.NEUTRAL)) {
return false;
} else {
throw new TempErrorException("included checkSPF returned an Illegal result");
}
} finally {
// Reset the ignore
spfData.setIgnoreExplanation(false);
spfData.setCurrentDomain(prevHost);