You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Rosenbaum, Larry M." <ro...@ornl.gov> on 2006/03/31 18:50:45 UTC

Error creating a DNS resolver socket: Permission denied

Running SpamAssassin 3.1.0, Perl 5.8.7, Solaris 9

We occasionally get the following error in our syslog:

Mar 30 06:53:27 email.ornl.gov spamd[102]: Error creating a DNS resolver
socket: Permission denied at
/usr/local/lib/perl5/site_perl/5.8.7/Mail/SpamAssassin/DnsResolver.pm
line 202, <GEN40810> line 541.

This corresponds to the following code:

    if (defined $sock) {  # ok, got it
      last;
    } elsif ($! == EADDRINUSE) {  # in use, let's try another source
port
      dbg("dns: UDP port $lport already in use, trying another port");
    } else {
      # did we fail due to the attempted use of an IPv6 nameserver?
      $self->_ipv6_ns_warning()  if (!$ipv6 && $errno==EINVAL);
      die "Error creating a DNS resolver socket: $errno";
    }

I have noticed that v3.1.1 has changed the "die" to a "warn", but I
don't know if that actually solves the problem.  I have some questions
about it:

1) What does SpamAssassin do after the function sets 
  $self->{no_resolver} = 1;   ?

2) Why would the socket creation encounter a "Permission Denied" error?
It is supposed to be using only nonprivileged local port numbers.

3) Would it make sense to treat EACCES the same as EADDRINUSE?  i.e. try
another port instead of giving up.

4) Why does the code loop through the nonprivileged port numbers instead
of just letting the system pick one?

Thanks,
Larry