[
https://issues.apache.org/jira/browse/MAILET-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984484#action_12984484
]
Stefano Bagnara commented on MAILET-30:
---------------------------------------
I want to be sure we correctly map things...
e.g: the javadoc should say that returning MX records the result is *sorted*
from the lower to the higher priority number.
Also how do we deal when the host exists but the record type doesn't exists?
return null / empty list / throw exception?
DNSJava gives us this result codes:
----
HOST_NOT_FOUND The host does not exist.
SUCCESSFUL The lookup was successful.
TRY_AGAIN The lookup failed due to a network error.
TYPE_NOT_FOUND The host exists, but has no records associated with the
queried type.
UNRECOVERABLE The lookup failed due to a data or server error.
----
Java Directory Lookup raises the following NamingExceptions:
-----
Timeout => CommunicationException
on SERVER_FAILURE => ServiceUnavailableException
on NAME_ERROR => NameNotFoundException
on NOT_IMPL || REFUSED => OperationNotSupportedException
on FORMAT_ERROR => NamingException
------
I think we should keep it as easy as possible.
What about your example? (TemporaryLookup maps both Timeout and Server_failure
and LookupException maps every other error and no null/empty results are
allowed?)
Sometimes it is useful to obtain a list of local names (in SPF we need it,
maybe this can be used also for other reasons):
List<String> getLocalDomainNames();
Should we add this to the interface too?
About the supported types, I think we need at least
A, AAAA, PTR, MX, TXT, SPF
What about: SRV, SOA, NS .. other?
> Add support for DNS querying via MailetContext
> ----------------------------------------------
>
> Key: MAILET-30
> URL: https://issues.apache.org/jira/browse/MAILET-30
> Project: Mailet
> Issue Type: Improvement
> Components: Core API
> Affects Versions: 2.4
> Reporter: Stefano Bagnara
> Fix For: 2.5
>
>
> DNS lookups are very frequent in the mail world (blacklists, authentication,
> whitelists).
> We know standard java DNS is not good about caching so we should provide a
> way for mailets to do the lookup and leave to container implementors the
> choice on how to deal with caching.
> Let's collect our use cases first and propose a small api change.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.