Hi, I'm running Mail-SpamAssassin-2.43's spamd on SunOS 5.8 (aka Solaris 8) with Sys::Syslog from Perl v5.8.0, with patch http:[EMAIL PROTECTED]/msg89347.html applied.
I had to patch spamd to get things going (patch against my /usr/local/bin/spamd is attached). The original spamd gives me a: # spamd -d -x -L -u nobody --syslog-socket=stream unix dgram connect: Socket operation on non-socket at spamd line 149 getservbyname failed for tcp at spamd line 157 udp connect: nobody listening at spamd line 157 failed to setlogsock() on this platform; reporting logs to stderr The patch enables the --syslog-socket flag, and calls openlog() where appropriate. Thanks for maintaining SpamAssassin! Bye, Joost PS: Please Cc replies to me, I'm not subscribed to the spamassassin-talk list. -- Joost van Baal http://www.uvt.nl/ Tilburg University [EMAIL PROTECTED] The Netherlands
--- spamd.orig 2002-11-19 12:55:49.000000000 +0100 +++ spamd 2002-11-26 09:59:58.882471000 +0100 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/local/bin/perl -w eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if 0; # not running under some shell @@ -111,6 +111,16 @@ $log_facility = 'mail'; } +my $log_socket; +if($opt{'syslog-socket'}) +{ + $log_socket = $opt{'syslog-socket'}; +} +else +{ + $log_socket = 'unix'; +} + my $dontcopy = 1; if ($opt{'create-prefs'}) { $dontcopy = 0; } @@ -145,15 +155,18 @@ if ($log_facility ne 'stderr') { eval { - setlogsock('unix'); + setlogsock($log_socket); + openlog('spamd','cons,pid',$log_facility); syslog('debug', 'spamd starting'); # required to actually open the socket }; # Solaris sometimes doesn't support UNIX-domain syslog sockets apparently; # same is true for perl 5.6.0 build on an early version of Red Hat 7! + # fall back to inet if ($@) { eval { setlogsock('inet'); + openlog('spamd','cons,pid',$log_facility); syslog('debug', 'spamd starting'); }; } @@ -1012,7 +1025,7 @@ =item B<--syslog-socket>=I<type> Specify how spamd should send messages to syslogd. The options are C<unix>, -C<inet> or C<none>. The default is to try C<unix> first, falling back to +C<inet>, C<stream> or C<none>. The default is to try C<unix> first, falling back to C<inet> if perl detects errors in its C<unix> support. Some platforms, or versions of perl, are shipped with dysfunctional versions of
msg10639/pgp00000.pgp
Description: PGP signature