title: Qmail SMTP server behind firewall configuration
body: <p>i've a problem with configuration Qmail + SimScan + SpamAssassin (dovecot + RoundCube) with SPF plugin.
  For Spf spam prevention, this system rejects  all mail that don't passed SPF test with tool "spfquery" (read SPF explanation for understand my problem).</p>
  
  <p>My Network configuration is:</p>
  
  <p><strong>NAT/Firewall: 10.0.1.1</strong></p>
  
  <p><strong>MailServer: 10.0.1.2</strong></p>
  
  <p><strong>Dns Server : 10.0.1.19</strong></p>
  
  <p><strong>External IP: 212.212.12.12</strong></p>
  
  <p>All modules in my mail server works greatly, also network configuration.
  Now i've problem with SPF-rejection or DNSBL, beacuse server IP for incoming mail is 10.0.1.1</p>
  
  <p>Log for smtp server is:</p>
  
  <blockquote>
    <p>CHKUSER accepted sender: from  remote mx5.pippo.com:unknown:10.0.1.1> rcpt &lt;> : sender accepted </p>
    
    <p>qmail-smtpd: spf-reject: HELO(mx5.pippo.com) from 10.0.1.1 MAILFROM:info@pippo.com</p>
  </blockquote>
  
  <p>Why my tcpserver see mail from <em>10.0.1.1</em> and not from mx record of <em>pippo.com</em>?
  This is a bad configuration of my NAT or tcpserver/smtp server?</p>