Examples of DNSRequest


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

            NoneException {
        SPF1Record res = (SPF1Record) spfData.getAttribute(SPF1Utils.ATTRIBUTE_SPF1_RECORD);
        if (res == null) {
            String currentDomain = spfData.getCurrentDomain();
            if (CHECK_ONLY_TXT_RECORDS) {
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.TXT), new SPFRecordHandlerDNSResponseListener());
            } else {
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.SPF), new SPFRetrieverDNSResponseListener());
            }
           
        }
        return null;
    }
View Full Code Here

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

                List spfR = response.getResponse();
               
                if (spfR == null || spfR.isEmpty()) {
                   
                    String currentDomain = session.getCurrentDomain();
                    return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.TXT), new SPFRecordHandlerDNSResponseListener());

                } else {
                   
                    String record = extractSPFRecord(spfR);
                    if (record != null) {
View Full Code Here

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

         */
        public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
                NoneException, TempErrorException, NeutralException {
            String host = macroExpand.expand(getHost(), spfData, MacroExpand.DOMAIN);

            return new DNSLookupContinuation(new DNSRequest(host, DNSRequest.TXT), ExpModifier.this);
        }
View Full Code Here

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

         */
        public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
                NoneException, TempErrorException, NeutralException {
            String host = macroExpand.expand(getHost(), spfData, MacroExpand.DOMAIN);

            return new DNSLookupContinuation(new DNSRequest(host, DNSRequest.TXT), ExpModifier.this);
        }
View Full Code Here

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

       * @see org.apache.james.jspf.core.SPFChecker#checkSPF(org.apache.james.jspf.core.SPFSession)
       */
      public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
                TempErrorException, NeutralException, NoneException {
            String host = expandHost(spfData);
            return new DNSLookupContinuation(new DNSRequest(host,DNSRequest.A), ExistsMechanism.this);
        }
View Full Code Here

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

       

        if (domainList.size() > 0) {
            String currentDomain = (String) domainList.remove(0);
   
            DNSRequest dnsRequest;
            // check if the connecting ip is ip6. If so lookup AAAA record
            if (IPAddr.isIPV6(spfSession.getIpAddress())) {
                // Get aaaa record for this
                dnsRequest = new DNSRequest(currentDomain, DNSRequest.AAAA);
            } else {
                // Get a record for this
                dnsRequest = new DNSRequest(currentDomain, DNSRequest.A);
            }
           
            spfSession.setAttribute(ATTRIBUTE_CURRENT_DOMAIN, currentDomain);
           
            return new DNSLookupContinuation(dnsRequest, PTRMechanism.this);
View Full Code Here

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

           
            spfData.setAttribute(ATTRIBUTE_EXPANDED_HOST, host);
           
            spfData.pushChecker(cleanupChecker);

            return new DNSLookupContinuation(new DNSRequest(ip.getReverseIP(), DNSRequest.PTR), PTRMechanism.this);
        }
View Full Code Here

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

            String mx;
            while (records.size() > 0 && (mx = records.remove(0)) != null && mx.length() > 0) {
                log.debug("Add MX-Record " + mx + " to list");

                return new DNSLookupContinuation(new DNSRequest(mx, isIPv6 ? DNSRequest.AAAA : DNSRequest.A), MXMechanism.this);
               
            }
               
            // no mx record found
            if (mxR == null || mxR.size() == 0) {
View Full Code Here

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

                TempErrorException, NeutralException, NoneException {

            // Get the right host.
            String host = expandHost(spfData);
           
            return new DNSLookupContinuation(new DNSRequest(host, DNSRequest.MX), MXMechanism.this);
        }
View Full Code Here

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

            NoneException {
        SPF1Record res = (SPF1Record) spfData.getAttribute(SPF1Utils.ATTRIBUTE_SPF1_RECORD);
        if (res == null) {
            String currentDomain = spfData.getCurrentDomain();
            if (CHECK_ONLY_TXT_RECORDS) {
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.TXT), new SPFRecordHandlerDNSResponseListener());
            } else {
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.SPF), new SPFRetrieverDNSResponseListener());
            }
           
        }
        return null;
    }
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.