Have recently changed a bunch of things related to DNS, MX records, and the configuration and location of my local james installation. In this process I've managed to establish an error condition and on investigation I've located a possible bug in the LocalDelivery mailet (James HEAD).
In LocalDelivery.init()
if (newConfig.getInitParameter("users") != null) {
users = newConfig.getInitParameter("users");
localusers = getMailetContext().getUserRepository(users);
} else {
log("No users repository defined for LocalDelivery");
}In the above fragment of code, the "users" and "localusers" variables only get initialized if newConfig.getInitParameter("users") is not null. In the case I'm dealing with the value is returning null.
Later on in LocalDelivery.service() we have the following:
if (ignoreCase) {
username = localusers.getRealName(recipient.getUser());
} else if (localusers.contains(recipient.getUser())) {
username = recipient.getUser();
}As localusers is null we get an NPE.
So one question is - should the init function be throwing an exception or should service throw an exception is localusers is null?
The second question concerns the recognition of the local user repository. James is logging the following:
[INFO ] (james.james.Mailet): LocalDelivery: No inboxURI defined for LocalDelivery
[INFO ] (james.james.Mailet): LocalDelivery: No users repository defined for LocalDelivery
However, the james configuration contains:
<inboxRepository>
<repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
</inboxRepository>... and the directory exists. Ummm - I'm confussed - any pointers appreciated.
Cheers, Steve.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
