This patch includes the previous one checking for the null return from spool.retrieve(), and adds a new feature. The [abbreviated] change is:
+ if (getInitParameter("serverName") != null) {
+ props.put("mail.smtp.localhost", getInitParameter("serverName"));
+ }
+ else {
Collection servernames =
getMailetContext().getAttribute(Constants.SERVER_NAMES);
if (servernames.size() > 0) {
props.put("mail.smtp.localhost", (String)
servernames.iterator().next());
}
+ }
The point is to add a <serverName> init parameter for the mailet, along you
to explicitly give JAMES an out-going SMTP name. Otherwise James uses the
first name in the serverNames collection. This is (a) an undocumented
side-effect, and (b) doesn't work if we change the collection to something
that isn't ordered, e.g., the HashMap I'm using. If you don't provide an
explicit <serverName> then RemoteDelivery reverts to the current
(undocumented) behavior.
--- Noel
james-diffs
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
