Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: devel

How do I make Net::DNS::Resolver take /etc/hosts into account?

 

 

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded


per at computer

Jul 1, 2009, 1:05 AM

Post #1 of 1 (98 views)
Permalink
How do I make Net::DNS::Resolver take /etc/hosts into account?

All,

for whatever reason, Net::DNS::Resolver (as used in SA) doesn't appear
to look at /etc/hosts. I thought it was a Net::DNS::Resolver
peculiarity, maybe something to do with cross-platform support, so in
a plugin module I've been writing, I tried to gethostbyname() instead.
I verified it outside of SA, and gethostbyname() does, as expected,
also consult /etc/hosts (provided /etc/nsswitch is correct configured).
However, when I use gethostbyname() from within SA, it does not
consult /etc/hosts ... which led me to conclude that Net::DNS::Resolver
does something to the resolver setup (at init-time) which makes it
ignore /etc/hosts.

Back to the subject line - how do I make Net::DNS::Resolver
take /etc/hosts into account?


/Per Jessen, Zürich

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.