Solved

need to configure sendmail to send without hostname

Posted on 2010-08-25
5
696 Views
Last Modified: 2013-12-18

I have a problem where I need to change how sendmail sends mail.  Currently, some external domains are rejecting mail because messages are sent from user@host.domain.com where it should be user@domain.com.

I found one site where someone posted changing Dj$w.hostname.com to Djhostname.com.  I did that and it didn't work.  When I sent mail to my account @acme.com it actually put the message in /var/spool/mail even though I don't have a local account.  I then sent mail to my hotmail account and it still showed user@host.domain.com (yes i did restart sendmail).

Anyone know how to remove the hostname so it gets sent as just @domain.com?
0
Comment
Question by:Seth Simmons
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Kailash Aghera
ID: 33528415
The following thread will help you to change from address on sendmail:

http://www.linuxquestions.org/questions/aix-43/changing-sendmail-source-address-338032/

- Kailash
0
 
LVL 34

Author Comment

by:Seth Simmons
ID: 33528459
It says "I added the following options to the *.mc file I used to create the sendmail.cf file."

Is that assuming it was created from source instead of rpm package?
0
 
LVL 6

Expert Comment

by:Kailash Aghera
ID: 33528657
0
 
LVL 34

Author Comment

by:Seth Simmons
ID: 33535948
My previous question was based on post 5.

I created a test.mc file and put those 2 lines in there.  When I use it with m4 it fails.

$ m4 /usr/share/sendmail-cf/m4/cf.m4 ./test.mc  > /tmp/sendmail.cf
NONE:0: m4: ERROR: end of file in string
0
 
LVL 34

Accepted Solution

by:
Seth Simmons earned 0 total points
ID: 33536849
Those instructions failed on the m4.

I did find another page that was slightly different and got it working.
At first it still showed the hostname.domain.com but then near the bottom it stated it has no affect for root.  I used a normal account and the mail was sent using just domain.com

http://forums.whirlpool.net.au/archive/1122017
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Nearly six years ago I was hired by a company to be their senior server engineer. One of my first projects was to implement Exchange Server 2007 on a Windows Server 2008 Single Copy Cluster for high availability. That was the easy part; read on to l…
Utilizing an array to gracefully append to a list of EmailAddresses
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now