Operating System - HP-UX
1824983 Members
3613 Online
109678 Solutions
New Discussion юеВ

Sendmail inserts host name into email addresses

 
SOLVED
Go to solution
jason thompson_1
Frequent Advisor

Sendmail inserts host name into email addresses

When mail is sent from this host, the from address is correct but the return path, recieved from and other fields show @hostname.domainname. This particular system is sending through a relay host and the domain is masqeuraded. Is there a way to get sendmail to stop inserting it's hostname into the return path:, recieved from:, and other fields in a email's header?
What's that smell?
7 REPLIES 7
Geoff Wild
Honored Contributor

Re: Sendmail inserts host name into email addresses

Sure, just set the DM macro in sendmail.cf:

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

Then restart sendmail...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dave La Mar
Honored Contributor

Re: Sendmail inserts host name into email addresses

Jason -
As Geoff stated changed the DM. In our environment we changed it to the domain name of the mail server.

Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
jason thompson_1
Frequent Advisor

Re: Sendmail inserts host name into email addresses

It is set, that is what I meant by the domain being masqueraded. The masquerading allows the from field to show the correct address, but there are other fields within the header that still insert the hostname.
What's that smell?
Geoff Wild
Honored Contributor

Re: Sendmail inserts host name into email addresses

Ok, are you using a "smart-relay" host?

# "Smart" relay host (may be null)
DSyourserver


Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dave La Mar
Honored Contributor
Solution

Re: Sendmail inserts host name into email addresses

Another option as per Shannon (no points for plagiarism please)-

You need to change the class of server, changing the $j will not have impact on this problem.

Edit sendmail.cf (normally in /etc/mail) and search for "CE root".

Change that entry to "CM root"

This will remove the hostname.domain and replace it with simply domain.

Note: This will only change mail from the server where the change is made. Incoming mail can not have the address changed by sendmail.

Sincerely,
Shannon Petry
"I'm not dumb. I just have a command of thoroughly useless information."
Geoff Wild
Honored Contributor

Re: Sendmail inserts host name into email addresses

I think you need to use the m4 configuration:

FEATURE(`masquerade_envelope')

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Stuart Abramson_2
Honored Contributor

Re: Sendmail inserts host name into email addresses

vi sendmail.cf
Set:
DMdomain.com
Unset:
CE root