Mailing List Archive

tcprules.
> For example, here are some rules:
>
> joe@127.0.0.1:first
> 18.23.0.32:second
> :third
> 127.:fourth

why is this true?
> If $TCPREMOTEIP is 127.0.0.1 and $TCPREMOTEINFO is bill, tcpserver(1)
> will follow the fourth instructions.

Why does it not follow the "third" instruction.
Re: tcprules. [ In reply to ]
On Feb 1, 2013, at 1:45 PM, qmail <qmail@gatworks.com> wrote:

> why is this true?
>> If $TCPREMOTEIP is 127.0.0.1 and $TCPREMOTEINFO is bill, tcpserver(1)
>> will follow the fourth instructions.
>
> Why does it not follow the "third" instruction.


Look at the explanation immediately above where you copied that from, where it explains the sequence in which it looks for rules:

5. shorter and shorter prefixes of $TCPREMOTEIP ending with a dot;
6 • shorter and shorter suffixes of $TCPREMOTEHOST starting with a dot, preceded by =, if $TCPREMOTEHOST is set;
7 • =, if $TCPREMOTEHOST is set; and finally
8 • the empty string.

"fourth" is an example of rule type #5, so that takes priority over "third" which matches #8.