|mdecheser on 27 Jul 2009 08:39:02 -0700|
I found a solution for this need. Here's the brief (simplified for ease of explanation):
You are an admin running two websites on the same server. Each site has its own corresponding nameserver (same named instance). You have 1 physical NIC with a 2nd virtual interface and two routable IP addresses. Each website (and ns) is assigned to an individual IP. One website is public, and one is "private". If you run 1 instance of sendmail and telnet to each IP address, telnet will return the same sendmail banner for both sites (server name, sendmail ID, version, etc).
You want sendmail to return a different hostname depending on which IP you telnet to.
Answer: Two instances of sendmail, each with its own config.mc tied to its own /etc/hostname* designation.
I wrote up a how-to and posted it to my new blog. I'm offering it up for the consumption of the community. Feel free to pick it apart, offer constructive criticism or other suggestion as to how I might improve the described solution.
NOTE: After fishing around for tips on how to solve this issue, I discovered that it's possible to command sendmail to remove most identifying flags in its banner, including the hostname, version, and even the word "Sendmail" itself. Out of the box, CentOS5 / RHEL5 offers up pretty much everything.
Many thanks to Casey Bralla for pointing me in the right direction to find the solution. Thanks to everyone else for providing concrete suggestions. Based on Linode's limitations (16GB HDD / 320MB RAM), running Xen VMs within this VM was not practical.
Sorry for the delayed response, but this implementation was tested in two dev environments before being pushed into production.
----- Original Message -----
From: "Casey Bralla" <MailList@nerdworld.org>
I think the simplest way would be to run 3 separate instances of sendmail in 3
eMail me directly if you like, Maybe we can discuss further.
On Tuesday 16 June 2009 12:10:59 pm firstname.lastname@example.org wrote:
> I recently discovered Linode. What a wondrous gift to humanity. The admins
> were kind enough to grant me 2 additional IP addresses on my Linode, for a
> total of 3. I'm running the latest CentOS (5.3).
> To be brief, I would like to configure sendmail to return a different
> hostname depending on which IP address is listening. Currently, sendmail is
> returning the primary hostname of the system when you telnet to port 25 @
> any IP.
> The purpose for the multiple IP addresses is to provide multiple nameserver
> hosts. I have 2 sites which I do not want associated with my hostname,
> domain or primary IP address. Essentially, I'd like to provide DNS on all 3
> IP addresses, but for different domains, each with its own distinct smtp
> Do I need to run separate instances of sendmail or named to accomplish
> this? I'm not certain that using virtual interfaces puts any bearing on the
> solution, but that's part of the configuration.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug