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

how to set the Received: header to something other than user@localhost

Status
Not open for further replies.

baldpope

Technical User
Mar 13, 2012
4
US
We're attempting to send mail from some of our internal systems, unfortunately it's being kicked out, due to the following header:

Code:
Received: (from jofficer@localhost)
	by smtp.server.com (8.13.8+Sun/8.13.8/Submit) id q2DIQiGU018293
	for jofficer@receipeitndomain.com; Tue, 13 Mar 2012 13:26:44 -0500 (CDT)

I've added entries in both submit.mc and sendmail.mc for masquerading, however localhost ALWAYS stays. I need it to show jofficer@domain.com. I've spent several hours toying with this - any help would be GREATLY appreciated.
 
Have you tried changing the hostname of the machine the server is on? If you are using that machine as a web server, mail server or both, you can still use that name for your machine since dns will be pointing to it already. However, if you are hosting other domains, you may want to go with something a little more generic.
 
Good morning Rhythm

The hostname of the server is properly setup. Our /etc/hostname is properly configured, additionally our forward and reverse dns is properly configured for this host.

I've completed some additional testing, and found that this appears specific to when sendmail acts as the client (echo "hello world | sendmail jofficer@recipientdomain.com) but if I manually enter the header messages (telnet localhost 25) then the message comes through as desired.

I believe my problem is specific to submit.mc/submit.cf but I'm not sure where to find my relevant problem.
 
Do you have these set in the MC file ?

FEATURE(always_add_domain)dnl
FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
FEATURE(masquerade_entire_domain)d

Force it here in the CF file if need be:

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM

Norm
 
Thank you for the reply Norm, unfortunately those settings already exist in my .mc file.

I did modify the .cf file, to include the following line:

Code:
Dj$w.domain.com

Unfortunately, my test is still showing localhost:

Code:
Received: (from root@localhost)
	by host.domain.com (8.14.4/8.14.4/Submit) id q2JM0GcR025634
	for jofficer@recipientdomain.com; Mon, 19 Mar 2012 17:00:16 -0500

 
found this from someone else

That didn't work on mine. I had to edit the /etc/hosts file and put the host name before localhost entry then restart sendmail service.
 
I have the following in my hosts file:

Code:
host mail # cat /etc/hosts
127.0.0.1       host.domain.com host localhost

I'd be curious if anyone could provide their headers (the initial received from) to confirm your not seeing the same problem I am.
 
Do you also have the Real IP address in the hosts file ?

example
192.168.1.10 host.domain.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top