Examples of DNSLookupContinuation


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

                dnsRequest = new DNSRequest(currentDomain, DNSRequest.A);
            }
           
            spfSession.setAttribute(ATTRIBUTE_CURRENT_DOMAIN, currentDomain);
           
            return new DNSLookupContinuation(dnsRequest, PTRMechanism.this);
        } else {
            spfSession.setAttribute(Directive.ATTRIBUTE_MECHANISM_RESULT, Boolean.FALSE);
            return null;
        }
View Full Code Here

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

           
            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.DNSLookupContinuation

     * @see org.apache.james.jspf.core.SPFChecker#checkSPF(org.apache.james.jspf.core.SPFSession)
     */
    public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
            TempErrorException, NeutralException, NoneException {
        log.debug("Processing modifier: " + this);
        DNSLookupContinuation res = checkSPFLogged(spfData);
        log.debug("Processed modifier: " + this + " resulted in "
                + res == null ? spfData.getCurrentResult() : " dns continuation...");
        return res;
    }
View Full Code Here

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

            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.DNSLookupContinuation

                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.DNSLookupContinuation

            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.DNSLookupContinuation

                List<String> 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.DNSLookupContinuation

                    List<String> aRecords = getARecords(host);
                    if (aRecords == null) {
                        try {
                            DNSRequest request = new DNSRequest(host, DNSRequest.A);
                            return new DNSLookupContinuation(request, AMechanism.this);
                        } catch (NoneException e) {
                            return onDNSResponse(new DNSResponse(aRecords), spfData);
                        }
                    } else {
                        return onDNSResponse(new DNSResponse(aRecords), spfData);
                    }
        
                } else {
                   
                    List<String> aaaaRecords = getAAAARecords(host);
                    if (aaaaRecords == null) {
                        try {
                            DNSRequest request = new DNSRequest(host, DNSRequest.AAAA);
                            return new DNSLookupContinuation(request, AMechanism.this);
                        } catch (NoneException e) {
                            return onDNSResponse(new DNSResponse(aaaaRecords), spfData);
                        }
                    } else {
                        return onDNSResponse(new DNSResponse(aaaaRecords), spfData);
View Full Code Here

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

            NoneException {
        SPF1Record res = (SPF1Record) spfData.getAttribute(SPF1Utils.ATTRIBUTE_SPF1_RECORD);
        if (res == null) {
            String currentDomain = spfData.getCurrentDomain();

            return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.SPF), new SPFStrictCheckDNSResponseListener());
           
        }
        return null;
    }
View Full Code Here

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

                List<String> spfR = response.getResponse();
               
                session.setAttribute(ATTRIBUTE_SPFSTRICT_CHECK_SPFRECORDS, spfR);
               
                String currentDomain = session.getCurrentDomain();
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.TXT), new SPFStrictSPFRecordsDNSResponseListener());
                   
            } catch (TimeoutException e) {
                throw new TempErrorException("Timeout querying dns");
            }
        }
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.