[ http://issues.apache.org/jira/browse/JAMES-358?page=comments#action_12312568 ]
Noel J. Bergman commented on JAMES-358: --------------------------------------- Re-reading RemoteDelivery, it occurs to me that this may be a very simple fix. We handle SendFailedExceptions at two layers in the code. The inner one effects the right loop for the MX records, and has: if (sfe.getValidSentAddresses() == null || sfe.getValidSentAddresses().length < 1) { if (isDebug) log("Send failed, continuing with any other servers"); lastError = sfe; continue; } else { // If any mail was sent then the outgoing // server config must be ok, therefore rethrow throw sfe; } The outer one has comments that I had added after learning some not entirely well-documented things about JavaMail, which should make this a relatively easy change. Note the comments, which say in part: * sfe.getInvalidAddresses() should be considered permanent. * sfe.getValidUnsentAddresses() should be considered temporary. * JavaMail v1.3 properly populates those collections based upon the 4xx and 5xx response codes. So the inner code should check to see if there ARE any valid unsent addresses, and if not, then we should abort the loop. > Too many RemoteDelivery attempts with many mx and many ip > --------------------------------------------------------- > > Key: JAMES-358 > URL: http://issues.apache.org/jira/browse/JAMES-358 > Project: James > Type: Bug > Components: Remote Delivery > Versions: 2.2.0 > Reporter: Stefano Bagnara > Priority: Minor > Attachments: DNSServer.java.singleIPperMX.diff, > james-config.xml.singleIPperMX.diff > > Take a domain with 5 mx servers each one with 6 associated ips. James > currently try to connect to each MX server even if the first server say > "5.1.1 user unknown", but even worst, james try to connect to each IP of each > MX server. > I think that james should only check each MX server once, at a random IP > address from the IP list for that mx hostname. > The permanent user error issue would be only a further optimization but the > IP issue is probably against the RFC specifications. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]