Re: Fwd: Balsa default mail submission on TCP port 587, not port 25 [major satx rr com]



On Wed, 11 July 16:13 balsa@microwave.com wrote:
> 
> I'm not sure what anyone else was trying to say,

Actually I was commenting on major's comments.

> but what *I* was saying ...

I know what you're saying and I agree to some extent but ...

> It was discussed that balsa itself was not adding the default port to the
> hostname, but that libESMTP was qualifying the bare hostname. I
> acknowledged that the right thing to do would probably be to have a
> 'canonize' function become part of libESMTP that would accept the setting,
> and return a fully qualified (incuding port number or service name)
> setting that should be stored in the application configuration. I also
> theorized that libESMTP probably did not hve such a function (yet).

... I have some difficulty with the "make canonic" idea, at least in these
particular circumstances ...

> To recap - I dont have a problem with the host[:port] syntax - I only have
> a problem with there being no clear indication of what the default port is
> *on the same screen the hostname is entered on*, especially when there is
> both an 'most currently implemented standard way' and a 'new official
> standard way' that are in conflict.

I would say that the solution is to put a text label over the Remote SMTP
server field along the lines of "hostname[:port] - default port 587"
to remind the user of the syntax.

The reason I'm uneasy about making a canonic version of the string out of
what a user provides is that it is impossible to work out what the canonic
host and service is because the resolver does not feed this back to the caller.

For example, if I pass "myhost" and "submission" to getaddrinfo() I have
no way of finding out that the resolver converted "myhost" to
"myhost.example.org" (or even "MYHOST.EXAMPLE.ORG").  Furthermore, I can't
tell if "submission" was looked up in /etc/services to get 587 and then
queried for A or AAAA records to get the host or whether the resolver might
have made a SRV query on a name server for "_submission._tcp.myhost.example.org"
to get a list of host names and ports for the submission service. (Note that
an SRV RR can specify a different port number on each host, otherwise SRV
is similar to MX.)

In the latter case it would be disastrous if the application converted
"submission" to 587 since port numbers are explicitly prohibited from SRV
record queries.  I can't even tell if SRV queries are implemented and, if
so, whether /etc/services is used as a fallback or not.  This is the sort of
thing that might vary between different implementations of getaddrinfo().

In short, I have no means of making a canonic form of the information
presented by the application.  I can guess what it might be but that
would almost certainly make things unusable for some users.

I think that the best that can be done is to perform a syntax check and
fail the libESMTP smtp_set_server api if this si the case.  Otherwise
I just pass the information to the resolver and let it get on with finding
a list of hosts and ports to try for the service.

Come to think of it, I should change the default service in libESMTP
from "587" to "submission" - its easy to go from "submission" to "587"
but not vice-versa.


Brian Stafford





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]