Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail 8.13 masquerade in submit.mc breaks aliases, local delivery

Status
Not open for further replies.

chouseman

Programmer
Mar 6, 2008
2
US
This is sendmail 8.13.3 as provided by HP for HP-UX 11.11. I seem to have stumped the HP forums with this question.

Call this machine "hpux.domain.com". The primary mail function is outbound mail, there's very little inbound traffic. Outbound messages can be addressed with an alias or the actual address. I use mailx for testing.

The outside world doesn't know hpux.domain.com, so sender addresses on mail and envelopes to external addresses must appear as so-and-so@domain.com instead of so-and-so@hpux.domain.com. Recipient addresses should be untouched. For that, I added this to sendmail.mc:

MASQUERADE_AS(`domain.com')dnl
MASQUERADE_DOMAIN(`hpux.domain.com')dnl
FEATURE(`masquerade_envelope')dnl

This fixed the sender address on mail sent to an alias which translates to an external address.
But mail sent directly to an external address did NOT have the correct sender address.

So I added those same three lines to to submit.mc. Now mail sent directly to an external address has the correct sender address. But recipient addresses of local users and aliases are being masqueraded as well. e.g.

mailx -s "test" somealias </dev/null

tries to deliver to somealias@domain.com instead of the alias address "somealias". Same thing for someuser - local delivery is broken as well.

I tried this:

FEATURE(`local_no_masquerade')dnl

in both sendmail.mc and submit.mc, but it didn't help. It's as if the `allmasquerade' feature was turned on - but it's not. And there's no directive to turn it off that I can add to submit.mc.

My hope was to make changes only to the .mc files. If I have to go tweak the resulting .cf file, then I might as well not bother with .mc at all and go attack the learning curve for changing .cf files.

I'm reading the .mc documentation at sendmail.org but so far haven't found the magic bullet for this. Anyone?
 
here is our submit.mc:
Code:
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')
FEATURE(`use_ct_file')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl
define(`confDOMAIN_NAME', `abcd.org')dnl

we do not have local_no_masquerade configured anyplace.
 
Why do you think that seeing your submit.mc will help me? There's no masquerade features in there. Do you even have masquerading enabled in sendmail.mc? If so, what does it look like and when you send directly to an SMTP address, does the masquerading work?

(If you said "yes" to the yes/no questions above, then your Red Hat experience doesn't apply to my HP-UX sendmail distribution.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top