Package org.apache.james.jspf.exceptions

Examples of org.apache.james.jspf.exceptions.NoneException


        // check the version "header"
        if (spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION + " ") || spfRecord.equalsIgnoreCase(SPF1Constants.SPF_VERSION)) {
            if (!spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION + " ")) throw new NeutralException("Empty SPF Record");
        } else {
            throw new NoneException("No valid SPF Record: " + spfRecord);
        }

        // extract terms
        String[] terms = termsSeparatorPattern.split(spfRecord.replaceFirst(
                SPF1Constants.SPF_VERSION, ""));
View Full Code Here


        } else {
            String[] fromParts = mailFrom.split("@");

            // should never be bigger as 2 !
            if (fromParts.length > 2) {
                throw new NoneException("Not a valid email address " + mailFrom);
            } else if (fromParts.length == 2) {
                this.currentSenderPart = fromParts[0];
                this.senderDomain = fromParts[1];
            } else {
                this.currentSenderPart = "postmaster";
View Full Code Here

public class NoSPFRecordFoundPolicy extends AbstractNestedPolicy {
    /**
     * @see org.apache.james.jspf.policies.AbstractNestedPolicy#getSPFRecordFallback(java.lang.String)
     */
    protected SPF1Record getSPFRecordFallback(String currentDomain) throws PermErrorException, TempErrorException, NoneException, NeutralException {
        throw new NoneException("No SPF record found for host: " + currentDomain);
    }
View Full Code Here

        // Initial checks (spec 4.3)
        if (currentDomain != null) {
            String[] labels = currentDomain.split("\\.");
            for (int i = 0; i < labels.length; i++) {
                if (labels[i] != null && labels[i].length() > 63) {
                    throw new NoneException("Domain "+currentDomain+" is malformed (label longer than 63 characters)");
                }
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.james.jspf.exceptions.NoneException

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.