title: Email header shows "received from 127.0.0.1"
body: <p>I hang on this problem for weeks now...</p>
  
  <p>I send mails from my server (debian 8 over ruby 1.8.7 NET::SMTP) over a another smtp server.</p>
  
  <p>A sent email have the following header</p>
  
  <pre><code>Return-Path: &lt;sender@mail.com&gt;
  Received: from XXXDOMAIN ([xxx.xxx.xxx.xxx]) by
   XXX MAILSERVER
   17:13:40 +0100
  Received: from 127.0.0.1 (REALDOMAIN [REALIP]) by
   REALMAILSERVERDOMAIN
   Tue, 15 Mar 2016 16:13:38 +0000
  Date: Tue, 15 Mar 2016 17:13:37 +0100
  From: admin &lt;sender@mail.com&gt;
  To: recepient@mail.com
  </code></pre>
  
  <p>The server gets blocked by the cbl, because of the 127.0.0.1.
  REAL PROBLEM FROM CBL: The listing of this IP is because it HELOs as 127.0.0.1</p>
  
  <p>If I make a EHLO over telnet everything is ok, but if I send a mail from ruby, I get the wrong header.</p>
  
  <p>My /etc/hosts:</p>
  
  <pre><code># nameserver config
  # IPv4
  127.0.0.1 jupiter
  127.0.0.1 localhost.localdomain localhost
  xxx.xxx.xxx.xxx  jupiter.domain.com jupiter
  #
  # IPv6
  xxx     ip6-localhost ip6-loopback
  xxx ip6-localnet
  xxx ip6-mcastprefix
  xxx ip6-allnodes
  xxx ip6-allrouters
  xxx ip6-allhosts
  xxxipv6stringxxx  jupiter
  </code></pre>
  
  <p>It would be great, if you have a solution for me.</p>
  
  <p>Thank you!</p>