Package org.apache.james.jspf.impl

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


        }
        return result;
    }

    private SPFResult check() {
        DefaultSPF spf = new DefaultSPF(new Slf4jToJspfLoggerAdapter());
        spf.setUseBestGuess(false);
        // null reverse path should correspond to empty string
        String fromNonNull =
                mailTransaction.getFrom() == null ? "" : mailTransaction
                        .getFrom();
        String helo = mailTransaction.getMessageContext().getHelo();
        String heloNonNull =
                helo == null ? "["
                        + mailTransaction.getRemoteInetAddress()
                                .getHostAddress() + "]" : helo;
        SPFResult result =
                spf.checkSPF(mailTransaction.getRemoteInetAddress()
                        .getHostAddress(), fromNonNull, heloNonNull);
        logger.debug("SPF check result: {} {}", result.getResult(), result
                .getExplanation());
        return result;
    }
View Full Code Here


        addHeader = new Boolean(getInitParameter("addHeader", "false"))
                .booleanValue();
        SPFLoggerAdapter logger = new SPFLoggerAdapter(new Boolean(
                getInitParameter("debug", "false")).booleanValue());

        spf = new DefaultSPF(logger);
    }
View Full Code Here

     */
    public void init() {
        addHeader = Boolean.valueOf(getInitParameter("addHeader", "false"));
        SPFLoggerAdapter logger = new SPFLoggerAdapter(Boolean.valueOf(getInitParameter("debug", "false")));

        spf = new DefaultSPF(logger);
    }
View Full Code Here

TOP

Related Classes of org.apache.james.jspf.impl.DefaultSPF

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.