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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail do not remove "localhost" from outgoing emails !

Status
Not open for further replies.

haneo

Programmer
Jan 2, 2002
274
CA
i have sendmail 8.11.2-14(red hat 7.1)

I have the domaine MyDomaine.com
I have configurated the sendmail to send and to receive emails

The recorde in /var/named/MyDomaine.com :

NS ns.MyDomaine.com.
MX 10 ns.MyDomaine.com.
ns A IP_OF_mail_server



And in the /etc/mail/sendmail.mc

i have addedd the lines:

MASQUERADE_AS(MyDomaine.com)dnl
MASQUERADE_DOMAIN(MyDomaine.com)dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(allmasquerade)dnl
EXPOSED_USER(`root')dnl

apdated sendmail.cf with m4


I have sent an email from my Yahoo account to this server i received the email:

X-Apparently-To: Myaccount@yahoo.fr via web9205.mail.yahoo.com; 25 Mar 2002 07:15:44 -0800 (PST)

Return-Path: <admin@MyDomaine.com>

Received: from IP_OF_mail_server (EHLO ns.MyDomaine.com) (IP_OF_mail_server) by mta572.mail.yahoo.com with SMTP; 25 Mar 2002 07:15:38 -0800 (PST)

Received: (from admin@localhost) by ns.MyDomaine.com (8.11.2/8.11.2) id g2PFF4p01329 for MyAccount@yahoo.fr; Mon, 25 Mar 2002 16:15:04 +0100

Date: Mon, 25 Mar 2002 16:15:04 +0100

De: admin@MyDomaine.com | Bloquer cette adresse | Ajouter au carnet d'adresses

Message-Id: <200203251515.g2PFF4p01329@ns.MyDomaine.com>

À: MyAccount@yahoo.fr

Objet: test06

Content-Length: 6



Why i have the world :
from admin@localhost (localhost should not appear here ?!!!!)
I am meassing some thing ????

Thanks for help ;-)
 
If you sent the mail from the localhost, then it would appear to be from user@localhost. You need to setup you networking so that your machine name is the same as your domain name (i.e. mail.domain.com). When this is done, then your email would appear to have come from user@mail.domain.com. You could even alias the main domain, so that the mail would be user@domain.com.

Good Luck
 
Thank you very much for your rapide answer ;-)

But excuse me tobother you again can you tell me how to set the name of my machine as the name of our domaine.

My /etc/hosts is like this:
127.0.0.1 localhost localhost.localdomain
IP_HERE ns.MyDomaine.com MyDomaine

 
Hi,

Your entry :

MASQUERADE_DOMAIN(MyDomaine.com)dnl

means only masquerade mail that has that origin domain. You'd have to have something like this :

MASQUERADE_DOMAIN(`localhost.localdomain', 'localhost')

You can also use generics. You define one or more gerneric domains ...

GENERICS_DOMAIN(`localhost')

Then map user names to mail addresses in the file /etc/mail/genericstable . For example :

localusername mailaddress@provider.com

You then have to do :

# makemap hash /etc/mail/genericstable.db < /etc/mail/genericstable

Hope this helps



 
Thanks very much cyoug and ifincham !!
I will try your tips ifincham tomorrow (it's here 17hPM now) I hope that will work, else !!!!! :--( i will have problems with my boss.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top