Charles Marcus wrote:
Can I set up DNS (and MX records) for several different domains to point
to the same postfix instance/host/IP address and reference that same
postfix instance/host/IP by different DNS host names (smtp.example1.com,
smtp.example2.com, etc), and have everything just work?
Usually one will just set up extra MX records to host virtual
domains, and tell your clients to use the "primary" domain
name (rather than their own virtual name) in their mail client
to submit mail.
While you can create multiple DNS A records pointing to the
same host IP, that will screw up TLS verification and raise
the false expectation that only the hosted virtual domain name
will be visible.
It's likely to be more confusing if the client sees
"unexpected" domain names in the headers of mail he sends and
receives. Postfix (or any mail server) will continue to use
its primary domain as the HELO greeting and recorded in
Received: headers.
If you want to "customize" the email such that each domain
only sees their own virtual name in mail, you will need a
separate IP for each domain, along with either multiple
postfix instances or complicated master.cf gyrations.
> I guess the question is just too simplistic and basic, so
my apologies...
>
SMTP hosting is quite different from HTTP hosting. In SMTP
the server announces its hostname before the recipient is
known, so the hostname cannot be hidden and cannot be based on
recipient information.
Stupid illustration:
(http client knocks on the door):
Who are you looking for?
(is this Mike's web server?):
Yes, it is. Here is his page...
So the http client only sees Mike's name above, because the
client told us the answer he expected.
(smtp client knocks on the door):
Welcome to Bob's mail server. Got some mail?
(do you accept mail for Mike?):
Yes, please send it...
And here the smtp client will always see Bob's name, no matter
who he's trying to contact.
--
Noel Jones