the problem is that with Victor's PCRE:
smtpd_data_restrictions =
check_client_access pcre:/etc/postfix/add_header.pcre
add_header.pcre:
# Client name, not an IPv4/IPv6 address:
/[^\d.:]/ DUNNO
# Otherwise:
/^(.*)$/ PREPEND X-Send-IP: ${1}
i get this headers:
X-Sender-IP: localhost
Received: from mta01.montecarlo (localhost [127.0.0.1])
by mta01.montecarlo (Postfix) with ESMTP id 505E01680CB
X-Sender-IP: unknown
Received: from mta-relay (unknown [192.168.79.22])
by mta01.montecarlo (Postfix) with ESMTP
what i need to get is not localhots is the ip 127.0.0.1
and in the secon case what i need to get in 192.168.79.22
2008/11/6 mouss <[EMAIL PROTECTED]>
> Iker Perez de Albeniz wrote:
>
>> an other quiestion.. abaut this postfix..
>>
>
> if it's another question, better start another thread. or at least, trim
> the old conversation.
>
>
>> why sometimes i get an IP an other a client name???
>>
>
> if you mean in access checks, postfix will generally lookup both. first the
> hostname, then the IP. This should be ok for most purpuses. to only check
> IPs, use a cidr map.
>
> and if you use a cidr map, do not postmap it.
>
>
> is ther any way to force
>> postfix to resolve allways the names to get te ips?
>>
>
> there is no point to resolve the name. The IP is known before the name is!
> (the name is obtained by resolving the IP). you want cidr.
>
> for example in
>> uceprotect DNSBls system they give you that script:
>>
>>
> 1- if this is a "real" mail server, don't use uceprotect. it is unsafe.
>
> 2- read about reject_rbl_client and its friends.
>
> 3- to download uceprotect lists, use rsync instead of wget:
>
> rsync --times -azv \
> rsync-mirrors.uceprotect.net::RBLDNSD-ALL/dnsbl-2.uceprotect.net \
> .
>
>
> 4- the files need to be converted to a format usable by postfix. something
> like:
>
> awk '{print $1 " REJECT listed in uceprotect blah blah"}' $file >
> uceprotect.tmp && mv uceprotect.tmp uceprotect.cidr
>
>
>
>