?
Solved

Sendmail add the hostname as a prefix to the domain name

Posted on 2003-03-07
6
Medium Priority
?
312 Views
Last Modified: 2013-12-17
Dear Experts,

I have my sendmail configured, and it works almost perfectly in my labs except:

1. when I sent from user1 to a user let's say user2@domain.com, the recipient received as from user1@SERVER.domain.com instead of user1@domain.com.

2. In my second scenario is that I configured my sendmail to use my ISP smart host(mail.DomainA.com) for relaying mail while my local coporated mail is mail.DomainB.com.

Now, whenever I sent a mail to out side world from my LAN, the recipients received my message as from the ISP domain name i.e user@DomainA.com instead of appearing from my original address which is user@DomainB.com.

Is that something to do with "MASQUERADE_AS, MASQUERADE_DOMAIN or MASQUERADE_ENVELOP" at my ISP?

Thanks very much in advance,
0
Comment
Question by:sthay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:kenfcamp
ID: 8096574
check your sendmail localhosts file if you don't see a listing for 'domain.com' try adding one.

Every "actual" domain should have a listing in this file

Depending on the version of Sendmail you're using it should be located in /etc/mail
0
 

Author Comment

by:sthay
ID: 8101314
Dear Kenfcamp,

Thanks for the advise. Do you mean that I have to check /etc/mail/local-host-names file? FYI, in my file, there is "domain.com" listed.

Do you also have any suggestion on my second scenario?

Thanks so much again.

Rgds,
PS. My sendmail is came with RH 7.3.
0
 
LVL 15

Accepted Solution

by:
samri earned 150 total points
ID: 8101541
sthay,

yes.  Check the masquerading feature.

Sendmail's own documentation on the subject:

http://www.sendmail.org/m4/masquerading.html

A quick hack would be modifying
DMyourdomain.com in sendmail.cf

The standard way would be modifying /etc/mail/sendmail.mc to have the following lines;

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

and the do "m4 /etc/mail/sendmail.mc > /etc/sendmail.cf"
** make sure you had backup your existing sendmail.cf (just in case).

A few PAQ (Previously Asked Questions):
http://www.experts-exchange.com/Networking/Email_Groupware/Sendmail/Q_20388481.html
http://www.experts-exchange.com/Networking/Email_Groupware/Sendmail/Q_20339019.html
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:sthay
ID: 8106933
1. I worked out at my own regarding the first scenario. My DNS wasn't working properly so that's why sendmail added my hostname as a prefix to the domain name i.e. @hostname.domain.com.

2. Samri has given me the right answer to my second scenario. I am happy to award him a point. Thanks also to Kenfcamp who also contributed an advise.

Regards,
0
 

Author Comment

by:sthay
ID: 8106949
1. I worked out at my own regarding the first scenario. My DNS wasn't working properly so that's why sendmail added my hostname as a prefix to the domain name i.e. @hostname.domain.com.

2. Samri has given me the right answer to my second scenario. I am happy to award him a point. Thanks also to Kenfcamp who also contributed an advise.

Regards,
0
 
LVL 15

Expert Comment

by:samri
ID: 8109082
thanks.

I tought that Masquerading could have taken care problem #1 too.  
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft has released various new features which are capable of handling various tasks. One of these tasks is ‘Migration from pop3 to Exchange Server’. Pop3 data stores various data along mailboxes like contacts, tasks, etc. So, it becomes the need…
Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question