Sujet : Re: How to know local IP on which mail was received on
De : gtaylor (at) *nospam* tnetconsulting.net (Grant Taylor)
Groupes : comp.mail.sendmailDate : 12. Dec 2024, 04:13:47
Autres entêtes
Organisation : TNet Consulting
Message-ID : <vjdkdb$89l$1@tncsrv09.home.tnetconsulting.net>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 12/11/24 13:45, Claus Aßmann wrote:
The simplest approach is to use multiple DaemonPortOptions, anything else is (significantly) more complicated.
That's what I do.
Though I do wonder if it might be possible to have an abstraction hostname that is referenced via /etc/hosts on each system.
Presuming that all systems had two IPs and that there is a way to use a name abstraction; maybe something like this:
DAEMON_OPTIONS(`Family=inet, Address=ip-place-holder-A, Name=MTA-v4-IP-A')dnl
DAEMON_OPTIONS(`Family=inet, Address=ip-place-holder-B, Name=MTA-v4-IP-B')dnl
Then have entries like the following in the /etc/hosts file on host1
192.0.2.11 ip-place-holder-A
192.0.2.12 ip-place-holder-B
And similar entries in the /etc/hosts file on host2
192.0.2.21 ip-place-holder-A
192.0.2.22 ip-place-holder-B
This is predicated on if ip-place-holder-A type thing would work in the config. I don't know.
I've presented the mc (m4) syntax which provides some flexibility to do some interpretation when compiling the mc (m4) into the cf file. As in I think you could get m4 to run commands and extract the necessary information to place in the compiled cf output.
If you do this in the cf file directly, it would be predicated on if if Sendmail will resolve a hostname in this type of situation or not. I don't know of this is possible or not.
Both of these would be a change from the current configuration. But name resolution would allow consistent config files across multiple systems with the differences being contained in the /etc/hosts file which already probably has some host specific things like loghost, etc.
-- Grant. . . .