Sendmail Configuration - Masquerading

Greetings,
this is a new install. Sendmail 8.12.10 on Redhat Linux Enterprise 9.0
The server is NATed behind a firewall, so it has a private hostname and IP. It is to be a relay for an internal Exchange server.
The Host name is "Priv", the DMZ domain is "Local.priv". The Public domain is "Domain.com". the Exchange box sits in "Domain.Otherdomain.com".
The goal is to send/receive mail and have it appear as "user@Domain.com". Can you advise the correct way to do this?

Also, what is the best way to test Sendmail and that this server is relaying correctly? I tried running the command line /usr/lib/sendmail with various switches, but that doesn't seem to work correctly.

thank you in advance for your assistance.

Jeff.
SysdeathAsked:
Who is Participating?
 
pablouruguayConnect With a Mentor Commented:
ok. you need to create a file /etc/mail/generics-domains and add domain.com in this file
 

 modify this lines in /etc/mail/sendmail.cf

# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{E}root
C{M}domain.com
F{G}/etc/mail/generics-domains



# who I masquerade as (null for no masquerading) (see also $=M)
DMdomian.com



its all
0
 
SysdeathAuthor Commented:
Thank you for your post.
When you say to modify the lines, do you mean that I should un-comment all of them? Like this -class E: names that should be exposed as from this host, even if we masquerade
class L: names that should be delivered locally, even if we have a relay
class M: domains that should be converted to $M
class N: domains that should not be converted to $M
CL root
C{E}root
C{M}domain.com
F{G}/etc/mail/generics-domains

Aslo, there are multiple C{M} lines like this-
C{M}localhost
C{M}localhost.localdomain
C{M}mydomainalias.com
C{M}mydomain.lan

Do I change all or those?

Thanks again,
Jeff

0
 
pablouruguayCommented:
like i put up  only these 3 lines was uncomment


#class L: names that should be delivered locally, even if we have a relay
#class M: domains that should be converted to $M
#class N: domains that should not be converted to $M
#CL root
C{E}root
C{M}domain.com
F{G}/etc/mail/generics-domains

you masq only with the real domain

C{M}mydomainalias.com

and another think... you need to add the lines
mydomain.lan
mydomainalias.com


localhost into the file

/etc/mail/local-host-names


0
 
SysdeathAuthor Commented:
Hey, never mind.
After some experimentation, I got it.
Life is good, thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.