* @param hostName
* The hostname which was provided as HELO/EHLO
* @return result The SPFResult
*/
public SPFResult checkSPF(String ipAddress, String mailFrom, String hostName) {
SPF1Data spfData = null;
String result = null;
String explanation = null;
try {
// Setup the data
spfData = new SPF1Data(mailFrom, hostName, ipAddress);
spfData.enableDNSService(dnsProbe);
checkSPF(spfData);
String resultChar = spfData.getCurrentResult() != null ? spfData.getCurrentResult() : "";
result = SPF1Utils.resultToName(resultChar);
explanation = spfData.getExplanation();
} catch (SPFResultException e) {
result = e.getResult();
if (!SPF1Utils.NEUTRAL_CONV.equals(result)) {
log.warn(e.getMessage(),e);
}