nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] rcvdist with non-default port


From: Ken Hornstein
Subject: Re: [Nmh-workers] rcvdist with non-default port
Date: Mon, 15 Jan 2018 13:14:37 -0500

>>post(8) not reading the profile was a long-standing deliberate design
>>decision, and the way the code is implemented it's not possible to
>>distinguish between "switches from the profile" and "switches from the
>>command line".
>
>This is where it shows that you know the code base and I don't. :-)
>
>Although I don't fully understand this; post already accepts -port on
>the command line, the problem is (just) that I can't take advantage of
>that because I'm not running post directly.

Right, but ... you want post to read the profile, right?  You suggested
that we only accept -port from the profile?  We don't know that any switch
is from the profile; with the current nmh code we don't know where a switch
comes from (when you read the profile things are sucked into the argument
list so it all looks like it came from the command line).

>Still, from the perspective of an outsider who may be unaware of an
>obvious reason why this would be a bad idea, what I'd propose is:
>
>   - the (new, optional) mts.conf entry would be specified as
>
>        port:  NNNN
>
>     for some integer NNNN

Well, the devil is in the details.

You can have multiple server entries in mts.conf.  Does the port number
apply for all of them?  Do you want to associate a port number with a
particular server?  If so, then it makes sense to associate the port
number with a server, which means you really want to say something like:

server: foo.bar.com:25 foo2.bar.com:25

But .... what if you want to put an IP address?  Can't use a ':' because that
conflicts with IPv6.  You can then try something like:

server: [ff80::1]:25

or:

server: ff80:1/25

But that requires us parsing the "servers" line, and THAT means
rototilling the code more than you would think, because the idea you
could change the port number came kind of late to nmh.  So internally
there's a bunch of stuff that would have to change.

All of these things are DOABLE, it's just more complicated than it seems
at first glance, and working it all out requires some careful thought.
Welcome to programming nmh! :-/

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]