On Sat, 11 Mar 2000 patl@??? wrote:
> That would handle some of the things I want to do; but I also want
> to be able to insert it into file paths; so a separate variable
> would probably be more generally useful. (I'm assuming that if
> there were an $interface_host variable, it would be possible to
> use 'qualify_domain = $interface_host' and similar constructs to
> effectively replace primary_hostname wherever desired.)
Ah! Possible problem here. A host may have many interfaces, and there
are people who want to use different interfaces for different types of
outgoing message. That is why "interface" is in the smtp transport
rather than being a global option. You could have different transports
that used different interfaces.
qualify_domain is not an expanded variable; it is one of the basic bits
of data for the configuration.
I think I'm still not clear as to exactly what you want to do here. Is
it that you just want to set a single IP address for the outgoing
interface, and have the hostname obtained from this value rather than
the current means, or is that too simple? I can't see any use for a
variable unless it is going to vary! If it isn't going to vary, then a
macro can be used.
> I'm on a rush job right now; but when it is over, I may try to
> implement this myself (and submit patches). Is there an easy
> way to tell if the variable is actually used in the config file
> so that we could avoid the overhead of the DNS lookup if it
> isn't used? Will the right place for the lookup be fairly obvious
> when I start digging through the code. (Base that answer on the
> assumption that I'm a fairly senior software engineer...)
I can't really answer that because I'm not exactly sure what you are
trying to achieve. If there were a variable that was set by DNS lookup
from some IP address -- and at present there isn't such an IP address
except in the smtp transport -- then it could be coded to do the DNS
lookup the first time the variable was used.
Hmm. Wait a minute. You are talking about inserting the value into file
paths. That must mean you are talking about *incoming* messages, and
I've been thinking all the time about *outgoing* messages, which are
different. Of course, $interface_address is already available - clearly
$interface_name could be added. However, getting it to override
qualify_domain would be a different matter.
Philip
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.