[lug] "Simple" mail MTA setup?

Ken MacFerrin lists at macferrin.com
Mon Jan 8 10:58:54 MST 2007


> 
>> 5) DOES NOT INDICATE THE IP NUMBER THAT THE MAIL ORIGINATES FROM IN
>>    THE HEADER BUT IDENTIFIES IT AS ORIGINATING FROM THE SMARTHOST.
> 
> This will have to be done at the smarthost.  With postfix
> configuration I believe this is done with the masquerade_domains
> parameter
> 
> http://www.postfix.org/rewrite.html#masquerade
> 

IIRC, using masquerade_domains will help you rewrite the host/domain
name but not the actual IP address itself. The standard postfix
"received" header will usually contain the following:

Received: from machine.domain.com (domain.com [123.45.67.89]) by
smarthost.domain.com (Postfix) with ESMTP id XXXXX for
<reciepient at domain.com>; Date/Timestamp

Using masquerade_domains will allow you to rewrite the
"machine.domain.com" to just "domain.com" but will not allow you to
rewrite the "(domain.com [123.45.67.89])" section that includes the
client IP address.

I struggled with this same issue myself to clear up some problems I had
when implementing SPF & DKIM on my smarthost.  The only workaround I
found for actually rewriting the originating client IP in Postfix is to
use the "header_checks" method I mentioned earlier in the thread to
strip off the first header for mail originating from my client IPs.  My
preferred method would be to strip this header for any client sending
mail that authenticates via SASL as this would take away the need to
maintain specific IPs, but I haven't found a way to make it work yet.

-Ken





More information about the LUG mailing list