james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject Improving temporary failure handling in RemoteDelivery
Date Wed, 18 Jun 2003 17:37:54 GMT
In RemoteDelivery, we have the following:

  // This was not a connection or I/O error particular to one
  // SMTP server of an MX set.  Instead, it is almost certainly
  // a protocol level error.  In this case we assume that this
  // is an error we'd encounter with any of the SMTP servers
  // associated with this MX record, and we pass the exception
  // to the code in the outer block that determines its severity.
  throw me;

This is when handling a MessagingException that is not SendFailedException
during an SMTP transaction.  I just encountered one of these with:

RemoteDelivery: Exception delivering message (Mailxxx) - 451 4.7.1 Please
try again later

RemoteDelivery: Temporary exception delivering mail (Mailxxx:
javax.mail.MessagingException: 451 4.7.1 Please try again later

This was a temporary outage for 1 of 3 primary, 2 secondary, 1 tertiary, and
1 quaternary mail servers, i.e., 1 out of 7 possible servers.  It seems to
me that James should try the others in the case of a temporary exception,
e.g.,

   if (ex.getMessage() != null && '4' == ex.getMessage().trim().charAt(0)) {
     // best guess at a temporary failure
     lastError = me;
     continue;
   } else {
     throw me;
   }

Comments?

	--- Ne


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


Mime
View raw message