« Return to Thread: How do I make Net::DNS::Resolver take /etc/hosts into account?

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

by Charles Gregory :: Rate this Message:

Reply to Author | View in Thread

On Thu, 2 Jul 2009, Per Jessen wrote:
> 1) a tiny perl test-script using gethostbyname() will look at /etc/hosts
> and try to resolve the name from there. Works fine and just as
> expected.
> 2) a call to gethostbyname() from within an SA plugin does NOT look
> at /etc/hosts.

When in doubt, blame permissions. Make sure your first test is being run
as the same user as spamd/spamassassin (or as any unprivileged user).

- C

 « Return to Thread: How do I make Net::DNS::Resolver take /etc/hosts into account?