Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I think it may be triggering spam filters. The header looks as follows:

Received: from wordswithfriends.net (localhost.localdomain [127.0.0.1])

How can I get rid of localhost.localdomain? I'm running Centos

/etc/hosts:

127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
50.22.72.198    wor.wordswithfriends.net        wor
share|improve this question
    
Could you post your /etc/hosts, /etc/hostname and /etc/host.conf files? –  horacv Jan 29 '11 at 19:59

4 Answers 4

I doubt this is triggering spam filters. Its hard to say without more headers, but this is common for an application running on the same machine as the smtp server. The app is submitting the message through localhost.

But you can check /etc/hosts to ensure your host name is setup correctly. As well you can check your smtp server to ensure its using the proper host name.

share|improve this answer
    
+1 I have a feeling the content of the message might be the issue. –  Jacob Jan 29 '11 at 22:00
1  
I've worked with quite a few spam filters and have never seen one throw a fuss over the message originating from 'localhost' in an existing receive header. –  Chris S Mar 29 '13 at 2:19
    
@ChrisS I have seen this behavior (in a SpamAssassin ruleset from MANY years ago - and it was fixed the same day as a bug), but I wouldn't consider it typical or even likely. –  voretaq7 Mar 29 '13 at 2:23

/etc/hosts

insert between 127.0.0.1 and other entries, the FQDN you want, aka wordswithfriends.net

The mail server picks up the first entry for 127.0.0.1 ( since that is the connection used ) that has a . in it, aka FQDN.

So if you have

127.0.0.1 wordswithfriends.net servername localhost localhost.localdomain

You will show. Received: from wordswithfriends.net (wordswithfriends.net [127.0.0.1])

But as Steven said, I also doubt it is triggering spam filters.

share|improve this answer

Try the command hostname -f to see what your fully qualified name is. If you don't have a static address with the appropriate DNS entries use your ISP's relay to send email.

If you are sending email as localhost or localhost.localdomain, it will run into problems with spam filters. Your mail server must use its FQDN (fully qualified domain name) to send to the Internet (not required for your ISP's relay server).

Try sending email to an external email account you have access to and check the headers there. It is common to see email sent to the mail server from localhost or localhost.localdomain. The mail server must then use its name to forward the email.

Normally, your email server should known its FQDN so you should get received lines like:

Received: from localhost.localdomain ([127.0.0.1])
          (envelope-sender <somebody@example.com>)
          by mail.example.com (qmail-ldap-1.03) with SMTP
          for <recipent@example.net>; 29 Nov 2010 00:11:37 -0000
Received: from mail.example.com ([192.0.2.15])
          (envelope-sender <somebody@example.com>)
          by mx.example.net with ESMTP
          for <recipent@example.net>; 29 Nov 2010 00:11:39 -0000
share|improve this answer

I found an issue changing the order of the server names in /etc/host

before :

1.2.3.4 myserver myserver.server.corp

will add a localhost header

after :

1.2.3.4 myserver.server.corp myserver

will ignore the localhost header

share|improve this answer
1  
This is exactly the same as becomingwisest's answer. Unfortunately the premise of the question is wrong, so this is a non-answer... –  Chris S Mar 29 '13 at 2:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.