if (line.hasOption(CMD_DEBUG))
logger.setLevel(Level.DEBUG);
if (line.hasOption(CMD_VERBOSE))
logger.setLevel(Level.TRACE);
SPF spf = new DefaultSPF(new Log4JLogger(logger));
// Check if we should set a costum default explanation
if (defaultExplanation != null) {
spf.setDefaultExplanation(defaultExplanation);
}
// Check if we should use best guess
if (useBestGuess == true) {
spf.setUseBestGuess(true);
}
if (useTrustedForwarder == true) {
spf.setUseTrustedForwarder(true);
}
SPFResult result = spf.checkSPF(ip, sender, helo);
System.out.println(result.getResult());
System.out.println(result.getHeader());
System.exit(getReturnCode(result.getResult()));
} else {