I took another look at this issue and this time understood what you were
getting at about the SendFailedException Noel.

here is another patch aimed at allowing the use of other configured servers
in the event that one rejects a relay.

Tim
----- Original Message -----
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
To: "James Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:48 AM
Subject: RE: [PATCH] Re: multiple gateways possible?


> Tim,
>
> I reviewed this patch, and have incorporated a revision for testing into
the
> CVS for James v2.  Please note that I did NOT incorporate the 550 check.
> Primarily I did not do so because I am not convinced that the 550 as
> presented would not interact quite badly with send partial.  It seems to
me
> that 550 responses are going to come back packaged in a
SendFailedException.
> The current code was handling the special case of an IOException wrapped
in
> a MessagingException.
>
> I am not saying that the idea of going to another server in the case were
> one server in a set of possible addresses rejects a recipient isn't
> reasonable, but the execution of that idea in this patch does not appear
to
> be correct.
>
> The patch being posted also includes a requested change related to not
> incrementing the error count for each server, but rather incrementing the
> error count for each PASS through a set of servers.
>
> I tested these changes using the following configuration:
>
>   <mailet match="All" class="RemoteDelivery">
>      <outgoing> file://var/mail/gateway/ </outgoing>
>      <delayTime> 21600000 </delayTime>
>      <maxRetries> 5 </maxRetries>
>      <deliveryThreads> 5 </deliveryThreads>
>      <gateway>192.168.1.1</gateway>
>      <gateway>192.168.1.1:2525</gateway>
>      <gateway>192.168.1.1:2526</gateway>
>      <gatewayPort>25</gatewayPort>
>      <debug>true</debug>
>   </mailet>
>
> And logged the behavior as I incrementally shutdown all of the gateways,
and
> then brought one back up.
>
> PLEASE review the changes that I made.  I'm also going to commit them to
> HEAD in a few minutes.
>
> --- Noel
>
> -----Original Message-----
> From: Tim Stephenson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, May 24, 2003 13:57
> To: James Developers List
> Subject: [PATCH] Re: multiple gateways possible?
>
>
> OK let's try that again (attached). There didn't appear to be rules about
> the file format for the attachment, I used Unix style end of lines.
>
> About the 550 check: I included this in an attempt to minimise the change
in
> behaviour. If it is not there any failure that is not an IOException is
> deemed to apply to all servers in the gateway list so they are not tried.
> Since the exact reason for the failure appear not to be well understood
(at
> least by me) or are just broken as in your Notes example. I would prefer
to
> try all servers in the list in all failure cases, what do you think?
> Obviously this incurs a performance penalty in cases when the failure _is_
> for a more generalised reason, which is presumably why the code is as it
is.
>
> Tim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
Index: RemoteDelivery.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-james/src/java/org/apache/james/transport/mailets/RemoteDelivery.java,v
retrieving revision 1.49
diff -u -w -r1.49 RemoteDelivery.java
--- RemoteDelivery.java 27 May 2003 03:02:22 -0000      1.49
+++ RemoteDelivery.java 5 Jun 2003 11:45:09 -0000
@@ -334,6 +334,10 @@
                                       .append(outgoingMailServer);
                     log(logMessageBuffer.toString());
                     return true;
+                } catch (SendFailedException sfe) {
+                    if (isDebug) log("Send failed via, continuing with any other 
servers") ; 
+                    lastError = sfe;
+                    continue;
                 } catch (MessagingException me) {
                     //MessagingException are horribly difficult to figure out what 
actually happened.
                     StringBuffer exceptionBuffer =
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to