Link to home
Start Free TrialLog in
Avatar of titchener
titchener

asked on

Help setting up domain masquerading and enveloping

We have a Cobalt server running Linux.
We have added an additional website on the server that uses a separate IP address, different from the main IP address on the machine.

We need to set up the mail server so that we can send mail from the new IP address that doesn't contain the old IP address number or original domain name in any of the headers. We plan to use a modified sendmail.cf file and the sendmail command line to do this, ie:

sendmail -CsendmailMod.cf name@domain.com

From looking around the web, it appears that by using the following commands in the sendmail.mc file, it will generate a sendmail.cf file that does this for us-

FEATURE(masquerade_entire_domain)
MASQUERADE_AS(abc.com
MASQUERADE_DOMAIN(abc.com)

Will this eliminate all references to the original machine name and IP number in the mail headers?

If so, what entries does this cause in the sendmail.cf file? Unfortunately our machine does not have the build environment installed for sendmail, so I can't build a .cf file from a .mc file.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of titchener
titchener

ASKER

jlevie wrote-

> Also note that this will not cause the mail to actually orginate from IP of your virtual domain. Since that is an IP alias, it won't be the IP seen by remote MTA's. They'll still see the primary IP of the server.

The second domain is using a different IP address, and we need that address to appear rather than the primary one.
Is there a way to do that with a modified sendmail.cf file? If not, how is sendmail determining the IP address that is passed to the remote MTA?
When you send an outgoing message, sendmail is going to use the primary IP of the machine. So that's what the remote MTA will see as the originating host. I think there might be a way to bind an 8.12.x sendmail to a specific interface, which might change the source IP. But I don't know if that will work with an IP alias, which is what I assume you are using to implement your virtual domain.

Out of curiosity, why do you care what IP the mail origininates from? Ordinarily one only cares that the mail "appears" to be from a specific domain (the From header) so that folks who reply to a message will send the reply to the right place.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial