Package org.apache.james.dnsservice.library

Examples of org.apache.james.dnsservice.library.MXHostAddressIterator


                MailAddress rcpt = recipients.iterator().next();
                String host = rcpt.getDomain();

                // Lookup the possible targets
                try {
                    targetServers = new MXHostAddressIterator(dnsServer.findMXRecords(host).iterator(), dnsServer, false, logAdapter);
                } catch (TemporaryResolutionException e) {
                    log("Temporary problem looking up mail server for host: " + host);
                    String exceptionBuffer = "Temporary problem looking up mail server for host: " + host + ".  I cannot determine where to send this message.";

                    // temporary problems
View Full Code Here


     * @since v2.2.0a16-unstable
     */
    private Iterator<HostAddress> getGatewaySMTPHostAddresses(final Collection<String> gatewayServers) {
        Iterator<String> gateways = gatewayServers.iterator();

        return new MXHostAddressIterator(gateways, dnsServer, false, logAdapter);
    }
View Full Code Here

     * @since Mailet API v2.2.0a16-unstable
     */
    @Override
    public Iterator<HostAddress> getSMTPHostAddresses(String domainName) {
        try {
            return new MXHostAddressIterator(dns.findMXRecords(domainName).iterator(), dns, false, log);
        } catch (TemporaryResolutionException e) {
            // TODO: We only do this to not break backward compatiblity. Should
            // fixed later
            return Collections.unmodifiableCollection(new ArrayList<HostAddress>(0)).iterator();
        }
View Full Code Here

TOP

Related Classes of org.apache.james.dnsservice.library.MXHostAddressIterator

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.