You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Tim Stephenson <ti...@thestephensons.me.uk> on 2003/05/27 22:13:40 UTC

Re: [PATCH] (inc new doc patch) Re: multiple gateways possible?

Noel,

Looks like this is working! I had expected 550 wrapped as you described but
did not get it so far. I'll try a few more tests with some different hosts
as soon as I can since I suspect the success is down to some flakey configs
allowing relaying when they shouldn't.

To be honest I haven't a clue about how the send partial is affected so at
this stage I don't understand what is 'not correct' so I'll need to look
into that more.

Attached is a patch to the doco explaining the new tags' behaviour.

Tim
----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Developers List" <ja...@jakarta.apache.org>
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:tim@thestephensons.me.uk]
> 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: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org
>

RE: [PATCH] (inc new doc patch) Re: multiple gateways possible?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Looks like this is working!

:-)

> I had expected 550 wrapped as you described but did not get it so far.

If you look further down in the loop, you'll see where we pick up on 5xx
responses.  When we get them the assumption is that if it occurs on one
server, it would occur on all.  In fact, the same assumption is made
regarding 4xx -- we don't try another server in the list, we queue the
message for retrying later.

Someday someone will have time to rewrite RemoteDelivery to address these
(and other) issues.  But it won't be me any time soon.  :-)

> I haven't a clue about how the send partial is affected

Read the comments and code in the catch clause for SendFailedException.

	--- Noel


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