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've got a cheap and cheerful dedicated server from 1and1 that I use to send emails. The received email header looks like this:

Received: from s123456.onlinehome-server.info (s123456.onlinehome-server.info. [82.165.11.111])

I'd like that to say

Received: from my.awesome.domain (my.awesome.domain. [82.165.11.111])

Another answer I've read suggested "making a change to the /etc/hosts file, which looks like this:

127.0.0.1 localhost.localdomain localhost
82.165.11.111 s123456.onlinehome-server.info s123456
82.165.11.111 s987654.onlinehome.info

I'd nervy about adding or changing anything in that file and getting it wrong - do I just need to add

82.165.11.111 my.awesome.domain

on the second line?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

received headers are written by the receiving MTA based on your HELO and (forward confirmed) reverse DNS

  • set your SMTP HELO = my.awesome.domain by either configuring your system hostname (depends on os and distro how to do this.. /etc/hostname, /etc/sysconfig/hostname, /etc/hosts ....) OR overriding the autodetection in your MTA software (eg. in postfix main.cf set myhostname = my.awesome.domain)
  • set your reverse dns to my.awesome.domain in your vps control panel (or tell your vps provider to do this for you if there is no control panel where you can do it yourself)
  • make sure there is an dns A record my.awesome.domain 82.165.11.111 (this is required for the forward confirmation, otherwise the received line will probably say "Received from unknown[my.awesome.domain]...)

then wait until the TTL of the old rDNS record has expired and try again (in your case 2 hours)

share|improve this answer
    
I'm cool with the last two - how do I change the HELO setting? –  Grim... Nov 19 '12 at 12:04
    
depends on your MTA. many set the HELO to the system hostname by default , so one possibility is to configure the system hostname and let the MTA autodetect. if you're using postfix you can also set 'myhostname' in main.cf –  Gryphius Nov 19 '12 at 12:06
add comment

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.