LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-09-2010, 03:57 PM   #1
non77
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Rep: Reputation: 0
sendmail: How can I prevent localhost.localdomain from appearing in email?


When I send email through sendmail, by using a command such as:

Code:
echo "test" | mail test@gmail.com
This appears in email source:

Quote:
Received: from mydomain.com (localhost.localdomain [127.0.0.1])

Received: (from root@localhost)
How can I prevent this? Ideally it would display:
Quote:
Received: from mydomain.com (mydomain.com [server IP])

Received: (from root@mydomain.com)
I've tried playing around with the sendmail.mc file, but nothing seems to work.

Thanks.

Last edited by non77; 07-09-2010 at 04:22 PM.
 
Old 07-10-2010, 01:42 AM   #2
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
sendmail is a beast to configure, and as using the machine's hostname is a very reasonable default, if you want to change it, you have to edit and "compile" some macro files. I did that a long time ago, but I get the impression that you don't really WANT to use sendmail in your scenario? Because, if all you want is getting mails off your system with smtp, there are much easier alternatives:

- probably the easiest that does nothing else than forwarding your local system's mail per smtp: ssmtp.
- if you need a little more features, try a lightweight exim build, e.g. on a debian machine: exim4-daemon-light.
 
Old 07-10-2010, 03:37 PM   #3
non77
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Original Poster
Rep: Reputation: 0
I just want the ability to send emails from my domain, and not have it marked as spam because of the localhost stuff. I can receive them from somewhere else.
 
Old 07-10-2010, 04:16 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,897

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Hi,

You should use masquerade. There are lots of tutorials, so search for one that is written for your distro, or take a look at this generic one

Regards
 
  


Reply

Tags
localhost, masquerade, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail sending localhost.localdomain unix1adm Linux - Software 13 02-15-2010 07:17 AM
Mail from root@localhost.localdomain thru relay=localhost.localdomain[216.24.138.1] rshartog Linux - Server 2 02-02-2009 10:35 PM
sendmail from address is root@localhost.localdomain procfs Linux - Software 9 09-26-2006 10:42 AM
sendmail using localhost.localdomain joe.biz Linux - Software 1 10-27-2005 05:47 PM
sendmail and @localhost.localdomain deadlock Linux - Networking 4 12-17-2003 08:08 AM


All times are GMT -5. The time now is 12:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration