Package org.apache.james.jspf.core

Examples of org.apache.james.jspf.core.SPF1Data


     * @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);
            }
View Full Code Here

TOP

Related Classes of org.apache.james.jspf.core.SPF1Data

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.