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" <[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: provided_mailets_2_1.xml =================================================================== RCS file: /home/cvspublic/jakarta-james/src/xdocs/provided_mailets_2_1.xml,v retrieving revision 1.9 diff -u -r1.9 provided_mailets_2_1.xml --- provided_mailets_2_1.xml 14 May 2003 15:54:23 -0000 1.9 +++ provided_mailets_2_1.xml 27 May 2003 20:08:36 -0000 @@ -170,12 +170,18 @@ by this Mailet. Defaults to 60 seconds.</li> <li><strong>deliveryThreads</strong> (optional) - The number of threads this Mailet will use to generate SMTP connections.</li> -<li><strong>gateway</strong> (optional) - The host name of the SMTP server to be used as a gateway for -this server. If this value is set, then all messages will be delivered to the gateway server, -regardless of recipient address. If this value is unset, delivery will occur to SMTP servers resolved -by MX lookup.</li> -<li><strong>gatewayPort</strong> (optional) - The port number of the SMTP server to be used as a gateway for -this server. This value is required if gateway is set.</li> +<li><strong>gateway</strong> (optional) - The host name of the SMTP server +to be used as a gateway for this server. If this value is set, then all +messages will be delivered to the gateway server, regardless of recipient +address. To specify more than one gateway server, add multiple gateway tags, +each containing one value. If more than one server is specified, they will be +tried in order until one is successful. In addition the port may be specified +for each gateway in the format <host>:<port>. If this +value is unset, delivery will occur to SMTP servers resolved by MX lookup.</li> +<li><strong>gatewayPort</strong> (optional) - The default port number of the +SMTP server to be used as a gateway for this server. This value will be +employed when a gateway is set <em>and</em> the gateway value does not specify +a port as described above.</li> <li><strong>bind</strong> (optional) - If present, this value is a string describing the local IP address to which the mailet should be bound while delivering emails. If the tag is absent then the service will bind to the
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
