I am not sure if this is a bug or a usage problem.

I have been running spamd on Solaris 10 and Perl v5.8.9 for years, starting
it with the command:
spamd -d -c -m 18 --min-spare=1 --max-spare=4 --syslog-socket=inet

I upgraded Perl to v5.20.1 and installed the current modules. When I
try to start spamd with that command, I get the following errors:

setlogsock(): type='tcp': TCP service unavailable at
/opt/local/lib/perl5/site_perl/5.20.1/Mail/SpamAssassin/Logger/Syslog.pm
line 100.
server socket setup failed, retry 1: spamd: could not create
IO::Socket::IP socket on [::1]:783: Cannot assign requested address
server socket setup failed, retry 2: spamd: could not create
IO::Socket::IP socket on [127.0.0.1]:783: Address already in use
------------------- cut ---------------------------
server socket setup failed, retry 9: spamd: could not create
IO::Socket::IP socket on [127.0.0.1]:783: Address already in use
spamd: could not create IO::Socket::IP socket on [127.0.0.1]:783:
Address already in use

And spamd does not start. If I add '-4' to the above command then I get
only the error:

setlogsock(): type='tcp': TCP service unavailable at
/opt/local/lib/perl5/site_perl/5.20.1/Mail/SpamAssassin/Logger/Syslog.pm
line 100.

And spamd does start and I do have logging. If I remove the
'--syslog-socket=inet' then the error changes to:

setlogsock(): type='tcp': TCP service unavailable at
/opt/local/lib/perl5/site_perl/5.20.1/Mail/SpamAssassin/Logger/Syslog.pm
line 121.
logger: failed to add syslog method: logger: syslog initialization failed

And there is no logging. So it seems that '--syslog-socket=inet' is correct.

I conclude that the failed attempt to create an IPv6 socket blocks the
ability to later create IPv4 sockets to the same port. But note that with
Perl v5.8.9 and the module versions available in Dec 2013, there was no
problem without the '-4' switch. This sounds like it could be a bug
somewhere. And why does setlogsock complain about type='tcp now when
it did not with the older Perl?

Tom Schulz
Applied Dynamics Intl.
sch...@adi.com

Reply via email to