brent timothy saner on 16 Jun 2009 19:56:07 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] sendmail, multiple IPs, and virtual nics

(Sorry for top-post; on blackberry)

First off, +1 for postfix. Mail is... Not one of my specialities, we'll say. But even I found postfix logical. Exim and sendmail are nightmares to me. But this reply isn't to try and change your preferred mailer.

Instead, this reply is to mention that even if your mailer does not support virtual hosting (which I believe all major ones do), here's a quick hack which'd be much less resource-intensive than running a vm (or even vps- a sort of "glorified chroot".. I'm greatly simplifying, but that's the difference between vm and vps) for each ip:

1. Hack the init script (or make 2 addt'l ones, which'd prolly be more modular.. Depends on your admining preference) to start not one instance of the daemon, but three- all running on different ports. (You'll need to specify different confs for each instance. Most daemons have a switch for this but if not, it should be in the ./configure options so you'd have to install from source for the two addt'l ones ;/)

2. Write inbound firewall rules that say (example for smtp) "coming from THIS ip on 25, redirect to localhodt on port XX" and repeat for all associated services.

3. Create matching outbound firewall rules, set separate rDNS entries (IMPORTANT), create matching SPF records (IMPORTANT), etc.

YMMV, IANAD, etc.   

(lack of GPG due to message sent via blackberry device)

-----Original Message-----
From: Casey Bralla <>

Date: Tue, 16 Jun 2009 21:40:23 
To: Philadelphia Linux User's Group Discussion List<>
Subject: Re: [PLUG] sendmail, multiple IPs, and virtual nics

I think the simplest way would be to run 3 separate instances of sendmail in 3 
virtual machines.

But why does it matter what host sendmail returns during the login 
negotiation?  As long as you do virtual mailboxes, sendmail should be able to 
receive or send mail for any of them.  I don't think the domain 
acknowledgement when you telnet to port 25 really means much if sendmail is 
setup to do virtual domains.

Sorry, I'm not a sendmail guru.  I use postfix for multiple (separate) domains 
but all using the same IP.  (The multiple domain names all point to the same 

eMail me directly if you like,  Maybe we can discuss further.

On Tuesday 16 June 2009 12:10:59 pm 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
> hostname.
> 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.
> Cheers,
> mark


Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --
Philadelphia Linux Users Group         --
Announcements -
General Discussion  --