Hi folks,
Sorry for the long question, but after all, it's sendmail.
I'm trying to set up sendmail to masquerade my workstation as my domain. That is, I am
prn@foo.bar.com (actual addresses obviously changed for spam protection

) and I want my mail to go out as
prn@bar.com. So far that seems like a fairly standard thing to do. In fact, I have done it successfully with other (Solaris) systems.
With sendmail version 8.3.8-2 on FC6, I have edited my sendmail.mc file to include the lines:
Code:
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`bar.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(bar.com)dnl
Now I run m4 with the command:
Code:
m4 sendmail.mc >sendmail.cf
and it does create a new sendmail.cf file for me, but there is no
DMbar.com
line, and certainly no other lines relating to masquerading.
I
DO have the sendmail-cf package, viz:
Code:
# rpm -qa | grep sendmail
sendmail-cf-8.13.8-2
sendmail-8.13.8-2
I have also tried to add the line:
directly into my sendmail.cf and then I have restarted sendmail (with "/etc/init.d/sendmail restart"). My only "exposed user" is root, either in the .mc file or in the .cf file, but my test messages still arrive as being from
prn@foo.bar.com instead of
prn@bar.com. I presume that the other features may have something to do with this, but I'm not sure how to add things like "masquerade_envelope" or "masquerade_entire_domain" to the sendmail.cf file directly.
The "headers" in sendmail.cf that show which files from /usr/share/sendmail-cf/feature have been included in the processing list things like mailertable.m4 and redirect.m4, but do not include masquerade_entire_domain.m4 or masquerade_envelope.m4 (which seems somewhat logical since it perversely doesn't seem to be doing the basic masquerading at all).
Ideally, of course, I'd
much rather edit sendmail.mc (as the headers of sendmail.cf say I should) and let m4 do the heavy lifting, but in a less than ideal world I may have to be satisfied with editing sendmail.cf if that can be made to work. But the basic question is why m4 is ignoring the "MASQUERADE_AS" line in the first place.
Any clues gratefully accepted.
Thanks,
Paul