Package org.apache.james.jspf

Examples of org.apache.james.jspf.SPF


                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 {
View Full Code Here

TOP

Related Classes of org.apache.james.jspf.SPF

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.