sendmail masquerading question

Hiya,

Trying to set up an internal host to masquerade as our parent companies domain.

I think I'm close, but... not quite there.

Here's my info.

/etc/mail/sendmail.mc:

Code:
MASQUERADE_AS(NEWDOMAIN.com)
MASQUERADE_DOMAIN(OLDDOMAIN.com)
MASQUERADE_DOMAIN(NEWDOMAIN.com)
LOCAL_DOMAIN(backup.OLDDOMAIN.com)
FEATURE(allmasquerade)
FEATURE(masquerade_entire_domain)
FEATURE(genericstable, `hash -o /etc/mail/genericstable')

/etc/mail/genericstable:

Code:
root            CA_OAK_ITSupport@NEWDOMAIN.com  <mailto:CA_OAK_ITSupport@NEWDOMAIN.com>
bacula          backup@NEWDOMAIN.com            <mailto:backup@NEWDOMAIN.com>
daver           daver@NEWDOMAIN.com             <mailto:daver@NEWDOMAIN.com>

Further I do:

Code:
cd /etc/mail
make all
service sendmail restart

But emails I send are not having the ctladdr rewritten from daver@backup.OLDDOMAIN.com to daver@backup.NEWDOMAIN.com

What am I missing?

Dave
 
I don't know if m4's weird quoting is required, but would use it anyway.
Code:
MASQUERADE_AS(`example.com')
MASQUERADE_DOMAIN(`example.com')
FEATURE(`masquerade_entire_domain')
FEATURE(`masquerade_envelope')
 
Have you tried any other sources of information? Sendmail on FreeBSD is like Sendmail on any other system so any advice you find should apply to FreeBSD as well.
 
Looking back at this, there are not a lot of specifics.

Is the masquerading machine sending direct, or is it relaying through a smarthost?

Is the mail generated on the masquerading machine, or on hosts inside the network? If it is inside hosts, remember that they have to relay/smarthost through the masquerade machine.
 
ugh

OK folks, I haven't played with sendmail.cf since the late 90's. Now I see that I am not actually supposed to modify /etc/mail/sendmail.cf, and that when I did my [cmd=]make all install restart[/cmd] my DS line was overwritten as blank. So, my smarthost wasn't being used.

:OOOx(

So, I manually put it back in and things are working at least for my backup mail address. I will twiddle the others later. And I'll try to figure out where I should actually make the change to the DS line to make this change permanent.

Thanks for the pointer. At first I thought "Yes I'm using a smarthost and OF COURSE I modified the DS line!" but then experience has taught me to start from square one and I found that my smarthost line had been removed.
 
Thanks folks, it's working. For posterity, the hostname.mc file must be the FQDN of the host, not just the hostname.

Thanks again!
 
Back
Top