• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 720
  • Last Modified:

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
0
henry007
Asked:
henry007
  • 4
  • 3
  • 2
1 Solution
 
AmolCommented:
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

0
 
henry007Author Commented:
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
~
0
 
jar3817Commented:
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
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
AmolCommented:
can u comment this and chk,

FEATURE(`allmasquerade')dnl
0
 
henry007Author Commented:
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 ?
0
 
henry007Author Commented:
amolg, still not working after commenting out the:

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

# mail henry

Try with a full email address:

# mail henry@vxgxnx.net
0
 
henry007Author Commented:
It worked  that way, so there is no way of avoiding to type in all the domain name ? (i.e. @vxgxnx.net ) ?
0
 
jar3817Commented:
Well, not really, because when you don't specify a domain it looks like /etc/hosts for the name associated with the local IP. You might be able to change that entry in /etc/hosts, but that could mess up other services. If you're sending emails, better to just use the full email address.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now