[
https://issues.apache.org/jira/browse/MAILET-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984632#action_12984632
]
Stefano Bagnara commented on MAILET-30:
---------------------------------------
Yes, List<String> getLocalDomainNames() should return the same as
DomainList.getDomains. But DomainList is not in the mailetapi.
We currently publish "MailetContext.isLocalServer".
Well, in fact SPF just use it for macro expansion and it uses the first
available domain name, so we could even say we don't put this method in the
mailetcontext and instead when we provide the wrapper between MailetContext
lookup and SPF DNSService we can add a configurable receiving domain (a string
parameter in the mailet, or simply return "unknown"):
Here the SPF macro text:
---
The "r" macro expands to the name of the receiving MTA. This SHOULD
be a fully qualified domain name, but if one does not exist (as when
the checking is done by a script) or if policy restrictions dictate
otherwise, the word "unknown" SHOULD be substituted. The domain
name MAY be different than the name found in the MX record that the
client MTA used to locate the receiving MTA.
----
So, maybe we should just publish the method you proposed.
Do you think we should somehow differentiate the error between HOST_NOT_FOUND,
TYPE_NOT_FOUND and UNRECOVERABLE or simply they are all LookupException with
different exception strings but no way to identify the specific problem via
API? I think we can live with the simplification as most DNS "users" don't care
of specific issue but only care if the issue is temporary or permanent.
So, if there are no other opinions we can proceed with the method you proposed.
> 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.