I installed pdnsd: it is correctly working.
My problem is that it ignores the opendns server I provided in the "server" section of pdnsd.conf labeled "resolvconf": instead of it, it uses the server which is provided by the dhcp.
On the other hand, if I change the name of the server section to something else, then pdnsd correctly uses the opendns server but resolvconf put the dns provided by dhcp in resolv.conf, so pdnsd is bypassed.
So, my question is: how can I have resolvconf set resolv.conf to 127.0.0.1 AND pdnsd use opendns server when the request is not cached?
One workaround I found is to set, in network manager, "DHCP (address only)" for the connection, but the problem with this is that it must be set for every different connection: this means that if you use a laptop you have to change it for every wifi to which you connect!
/etc/resolvconf/update.d/pdnsd
?