Consider the following code, which implements automatic detection of MX
domains:
Collection mxRecords = dns.findMXRecords(domain);
if (mxRecords != null && (mxRecords.contains(us))
{ ... we are responsible for this domain ... }
else { we are not responsible for this domain ... }
One question is where to put such code. We could add that to
James.isLocalServer if the meaning of that method is that we are responsible
for that domain, but not if it means that we are also responsible for that
domain's storage. The latter is checked by calling
MailetContext.isLocalUser(), but we need to know when to bounce mail for
whom the local user is simply invalid.
So what does isLocalServer mean? Does it mean that the mail repository is
stored there? Does it mean that relaying checks don't need to be made? Do
we need two methods?
1 - Local Stores - mail will be stored locally
2 - Local Domain - mail may or may not be stored locally, but we are a
defined MX for that domain, and don't have to do relaying checks for mail
going to it.
3 - !Local Domain - we are being asked to relay mail for a domain that we
don't handle.
We need to clarify this point in order to more readily support complex
configurations than just local storage or remote relaying.
Another issue is what value to use for the parameter to
mxRecords.contains(...). We can't simply use
InetAddress.getLocalHost().getHost(). I wouldn't mind keying off of
getMailetContext().getAttribute(Constants.HELLO_NAME).
--- Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]