Link to home
Start Free TrialLog in
Avatar of henry007
henry007

asked on

How to hide Server Name in the domain name when sending an email using sendmail on SCO unix

When I send email using the command line to one account in the same server it's not hiding the server name on the domain section, why ? Here's an example :

# mail henry
Subject: test
test
.
EOT

> > >and here is the message received :

From: root@vxgxnx.net (Superuser)
To: henry@atksco1.vxgxnx.net
Subject: test


How can I get rid of that atksco1 ?

thanks
Avatar of Amol
Amol
Flag of India image

Open your sendmail config file /etc/mail/sendmail.mc:

# vi /etc/mail/sendmail.mc

Append/add/modify the lines as follows:

MASQUERADE_AS(vxgxnx.net)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(vxgxnx.net)dnl


Save and close the file. Update and restat sendmail server:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# /etc/init.d/sendmail restart

Avatar of henry007
henry007

ASKER

I checked the sendmail.cf file and it already has those settings, please look below, do I have extra lines that I should have ? thanks


### sco.osr6.mc ###
# divert(-1)
# #
# #  This is a generic configuration file for SCO OpenServer 6.
# #  It has support for local and SMTP mail only.  If you want to
# #  customize it, copy it to a name appropriate for your environment
# #  and do the modifications there.
# #
#
# divert(0)dnl
# VERSIONID(`@(#)opensrc:src/sendmail/patches/cf/cf/sco.osr6.mc /main/uw714mp/11
')dnl
# OSTYPE(sco.osr6)dnl
# DOMAIN(generic)dnl
# define(`confDONT_BLAME_SENDMAIL',`groupwritabledirpathsafe,linkedaliasfileinwr
itabledir')dnl
# FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
# FEATURE(`use_cw_file')dnl
# FEATURE(`always_add_domain')dnl
# LOCAL_CONFIG
# define(`confDOMAIN_NAME',`vegena.net')dnl
 define(`MASQUERADE_ENVELOPE')dnl
 define(`masquerade_entire_domain')dnl
# define(`MASQUERADE_NAME')dnl
 MASQUERADE_AS(`vegena.net')dnl
 FEATURE(`masquerade_envelope')dnl
 FEATURE(`masquerade_entire_domain')dnl
 MASQUERADE_DOMAIN(`vegena.net')dnl
 FEATURE(`allmasquerade')dnl
# MAILER(local)dnl
# MAILER(smtp)dnl
~
You only need the MASQUERADE_ENVELOPE feature and the MASQUERADE_DOMAIN. Also it shouldn't be in the LOCAL_CONFIG section, try this setup:



divert(0)dnl
VERSIONID(`@(#)opensrc:src/sendmail/patches/cf/cf/sco.osr6.mc /main/uw714mp/11')dnl
OSTYPE(sco.osr6)dnl
DOMAIN(generic)dnl
define(`confDONT_BLAME_SENDMAIL',`groupwritabledirpathsafe,linkedaliasfileinwritabledir')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`always_add_domain')dnl
define(`confDOMAIN_NAME',`vegena.net')dnl
FEATURE(`masquerade_envelope')dnl
MASQUERADE_DOMAIN(`vegena.net')dnl
MAILER(local)dnl
MAILER(smtp)dnl
can u comment this and chk,

FEATURE(`allmasquerade')dnl
Still not working, after reseting the P86sendmail stop / start script, I'm still seeing the atksco1.   this only happens when the email gets generated from the command line, If I use thunderbird/outlook to send an email to a SCO user it gets it perfectly. Any other idea ?
amolg, still not working after commenting out the:

 FEATURE(`allmasquerade')dnl
Instead of doing this:

# mail henry

Try with a full email address:

# mail henry@vxgxnx.net
It worked  that way, so there is no way of avoiding to type in all the domain name ? (i.e. @vxgxnx.net ) ?
ASKER CERTIFIED SOLUTION
Avatar of jar3817
jar3817

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