Ralf Hildebrandt a écrit :
> * Jaroslaw Grzabel <[email protected]>:
>> Ralf Hildebrandt wrote:
>>> Use an access(5) map on the client:
>>>
>>> check_client_access hash:/etc/postfix/nice_reject
>>>
>>> with:
>>>
>>> unknown 550 5.1.2 Your reverse DNS entries are off
>>>
>>>
>> Thank you for that Ralf. Do you know if may I operate on any variables ?
>> I need to have a message like "550 Fix your reverse DNS for IP
>> $IP_ADDRESS or use your ISP server. Please see: website to know more."
>
> Don't know. Probably not
> This triggers on the hostname "unknown", but I cannot get the IP at
> the same time.
he could "cheat" using restriction classes:
unknown reject_on_dns_error
reject_on_dns_error =
check_client_access pcre:/etc/postfix/reject_on_dns_error.pcre
and in the latter,
/^(\d\.+)$/ 550 ... blah blah $1 blah blah
Unfortunately, "unknown" is also the name in the case of a temporary dns
lookup failure. so using 5xx for all "unknown" is not a good idea.
OP needs to change his requirements, or he needs an external method
(policy server, milter, ...).