Examples of SPF


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

Examples of org.apache.james.jspf.impl.SPF

            }

        } else {
            throw new UnsupportedOperationException("Unknown executor type");
        }
        spf = new SPF(dns, parser, log.getChildLogger("spf"), macroExpand, executor);

        if (test != null) {
            String next = test;
            SPFResult res = runSingleTest(next);
            verifyResult(next, res);
View Full Code Here

Examples of org.apache.james.jspf.impl.SPF

            }

        } else {
            throw new UnsupportedOperationException("Unknown executor type");
        }
        spf = new SPF(dns, parser, log.getChildLogger("spf"), macroExpand, executor);

        if (test != null) {
            String next = test;
            SPFResult res = runSingleTest(next);
            verifyResult(next, res);
View Full Code Here

Examples of org.apache.james.jspf.impl.SPF

     * DNSService to use
     *
     * @param dnsService The DNSService
     */
    public void setDNSService(DNSService dnsService) {
        spf = new SPF(dnsService, new SPFLogger());
    }
View Full Code Here

Examples of org.apache.james.jspf.impl.SPF

            }

        } else {
            throw new UnsupportedOperationException("Unknown executor type");
        }
        spf = new SPF(dns, parser, log.getChildLogger("spf"), macroExpand, executor);

        if (test != null) {
            String next = test;
            SPFResult res = runSingleTest(next);
            verifyResult(next, res);
View Full Code Here

Examples of org.apache.james.jspf.impl.SPF

     * @param dnsService
     *            The DNSService
     */
    @Inject
    public void setDNSService(@Named("dnsservice") DNSService dnsService) {
        spf = new SPF(dnsService, new SPFLogger());
    }
View Full Code Here

Examples of org.apache.james.jspf.impl.SPF

            }

        } else {
            throw new UnsupportedOperationException("Unknown executor type");
        }
        spf = new SPF(dns, parser, log.getChildLogger("spf"), macroExpand, executor);

        if (test != null) {
            String next = test;
            SPFResult res = runSingleTest(next);
            verifyResult(next, res);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.