You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2009/12/30 17:23:38 UTC

[Bug 6267] New: Solaris 10 requires --syslog-socket=native

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

           Summary: Solaris 10 requires --syslog-socket=native
           Product: Spamassassin
           Version: 3.3.0
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: rosenbaumlm@ornl.gov


I have just recently installed SA v3.3.0-rc1 on Solaris 10.  I have discovered
that in order for syslog logging to work, I have to start spamd with the switch
"--syslog-socket=native".  It won't work if I set it to "unix" or "inet" or if
I omit the switch entirely.  As this is my first time running SpamAssassin on
Solaris 10, I don't know if this discovery also applies to older SpamAssassin
versions, but I suspect it does.  I suggest the documentation be changed to
reflect this, since currently it does not even mention "native" as a legitimate
option.

In the long term, perhaps "native" can be made the default, or have the code
just not call setlogsock() if the --syslog-socket switch is absent.  (I don't
know if this is feasible with older versions of Sys::Syslog.)

This is what the current docs say:

    --syslog-socket=*type*
        Specify how spamd should send messages to syslogd. The options are
        "unix", "inet" or "none". The default is to try "unix" first,
        falling back to "inet" if perl detects errors in its "unix" support.

        Some platforms, or versions of perl, are shipped with dysfunctional
        versions of the Sys::Syslog package which do not support some socket
        types, so you may need to set this. If you get error messages
        regarding __PATH_LOG or similar from spamd, try changing this
        setting.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #9 from Mark Martinec <Ma...@ijs.si> 2010-02-16 11:47:05 UTC ---
trunk:

  Bug 6331 - Win32: spamd logging: syslog-socket
  make --syslog-socket default to none on Windows
Sending spamd/spamd.raw
Committed revision 910488.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #1 from Mark Martinec <Ma...@ijs.si> 2010-02-10 07:33:08 UTC ---
The Sys::Syslog man page says:


setlogsock($sock_type, $stream_location, $sock_timeout) (added in 0.25)

Sets the socket type to be used for the next call to openlog() or syslog() and
returns true on success, undef on failure. The available mechanisms are:

"native" - use the native C functions from your syslog(3) library (added in
Sys::Syslog 0.15).

"eventlog" - send messages to the Win32 events logger (Win32 only; added in
Sys::Syslog 0.19).

"tcp" - connect to a TCP socket, on the syslog/tcp or syslogng/tcp service. If
defined, the second parameter is used as a hostname to connect to.

"udp" - connect to a UDP socket, on the syslog/udp service. If defined, the
second parameter is used as a hostname to connect to, and the third parameter
as the timeout used to check for UDP response.

"inet" - connect to an INET socket, either TCP or UDP, tried in that order. If
defined, the second parameter is used as a hostname to connect to.

"unix" - connect to a UNIX domain socket (in some systems a character special
device). The name of that socket is the second parameter or, if you omit the
second parameter, the value returned by the _PATH_LOG macro (if your system
defines it), or /dev/log or /dev/conslog, whatever is writable.

"stream" - connect to the stream indicated by the pathname provided as the
optional second parameter, or, if omitted, to /dev/conslog. For example Solaris
and IRIX system may prefer "stream" instead of "unix".

"pipe" - connect to the named pipe indicated by the pathname provided as the
optional second parameter, or, if omitted, to the value returned by the
_PATH_LOG macro (if your system defines it), or /dev/log (added in Sys::Syslog
0.21).

"console" - send messages directly to the console, as for the "cons" option of
openlog().

A reference to an array can also be passed as the first parameter. When this
calling method is used, the array should contain a list of mechanisms which are
attempted in order.

The default is to try native, tcp, udp, unix, pipe, stream, console. Under
systems with the Win32 API, eventlog will be added as the first mechanism to
try if Win32::EventLog is available.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #8 from Mark Martinec <Ma...@ijs.si> 2010-02-16 11:40:46 UTC ---
> btw would it be possible to default to syslog-socket=none on Win32
> to avoid the errors in bug 6331?

Like this:

-my $log_socket = lc($opt{'syslog-socket'}) || 'unix';
+my $log_socket = lc($opt{'syslog-socket'});

+if (!defined $log_socket || $log_socket eq '') {
+  $log_socket =
+    Mail::SpamAssassin::Util::am_running_on_windows() ? 'none' : 'unix';
+}

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P4                          |P2

--- Comment #4 from Mark Martinec <Ma...@ijs.si> 2010-02-16 01:48:10 UTC ---
trunk:

- spamd: updated documentation on --syslog-socket, listing
  additional socket types as recognized by Sys::Syslog::setlogsock;
- Logger/Syslog.pm: allow 'log_socket' argument to be undef
  or '', making possible to skip a call to setlogsock() and
  letting Sys::Syslog choose a default;
Bug 6267 - Solaris 10 requires --syslog-socket=native
Bug 6331 - Win32: spamd logging: syslog-socket
Sending        lib/Mail/SpamAssassin/Logger/Syslog.pm
Sending        spamd/spamd.raw
Transmitting file data ..
Committed revision 910376.


Please review: svn diff -c910376
Would this solve both this bug and the Bug 6331 ?

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #3 from Tom Schulz <sc...@adi.com> 2010-02-10 08:39:18 UTC ---
For whatever this is worth. We are running version 3.3.0 on a Solaris 10
Sparc machine with --syslog-socket=inet and it works. This is with Perl
v5.8.5 and Sys::Syslog version 0.05.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #11 from Mark Martinec <Ma...@ijs.si> 2010-02-16 12:12:15 UTC ---
> Shouldn't the default socket be decided in Logger.pm and not spamd?

That would be my preference too, which is why I paved grounds for it
by the patch to Logger/Syslog.pm.

I just didn't dare to change the defaults. Avoiding the overloaded semantics
of $log_socket and $log_facility would be beneficial for understanding code
too. As I'm not running spamd, I'll let others decide and test a sensible
solution.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jm@jmason.org

--- Comment #6 from Justin Mason <jm...@jmason.org> 2010-02-16 10:55:05 UTC ---
+1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Solaris 10 requires         |[review] Solaris 10
                   |--syslog-socket=native      |requires
                   |                            |--syslog-socket=native

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #7 from Justin Mason <jm...@jmason.org> 2010-02-16 10:56:08 UTC ---
btw would it be possible to default to syslog-socket=none on Win32 to avoid the
errors in bug 6331?

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #12 from Justin Mason <jm...@jmason.org> 2010-02-16 13:56:53 UTC ---
(In reply to comment #9)
> trunk:
> 
>   Bug 6331 - Win32: spamd logging: syslog-socket
>   make --syslog-socket default to none on Windows
> Sending spamd/spamd.raw
> Committed revision 910488.

+1 for 3.3.1.

I don't particularly mind about refactoring that into Logger.pm; for minimal
changes, it's quite ok to have that in spamd.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Henrik Krohns <he...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hege@hege.li

--- Comment #10 from Henrik Krohns <he...@hege.li> 2010-02-16 11:50:01 UTC ---

Shouldn't the default socket be decided in Logger.pm and not spamd?

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com
  Status Whiteboard|needs 1 vote                |ready to go

--- Comment #15 from Kevin A. McGrail <km...@pccc.com> 2010-03-02 20:24:42 UTC ---
(In reply to comment #13)
> Suggesting to go with the minimal change r910376 + r910488 for 3.3.1
> and resolve this ticket, then perhaps re-open or clone it for a
> cleanup of logging settings and changing a default.
> ( btw, I tried to go that path yesterday, but soon waded into trouble,
> requiring thorough testing :)
> 
> If I'm counting correctly, it needs one more vote.

+1 on this course of action.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lemke@jam-software.com

--- Comment #5 from Mark Martinec <Ma...@ijs.si> 2010-02-16 01:54:05 UTC ---
*** Bug 6331 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #2 from Mark Martinec <Ma...@ijs.si> 2010-02-10 07:40:14 UTC ---
It seems the current code does not validate the value of the --syslog-socket
option to be one of the documented names, but just passes it to setlogsock,
which happens to be a good thing.

It may indeed be sensible to let Sys::Syslog pick a suitable default,
and not call setlogsock at all unless specifically requested.

As a minimum the docs should be enhanced.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P5                          |P4
   Target Milestone|Undefined                   |3.3.1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |needs 1 vote

--- Comment #13 from Mark Martinec <Ma...@ijs.si> 2010-02-16 14:07:54 UTC ---
Suggesting to go with the minimal change r910376 + r910488 for 3.3.1
and resolve this ticket, then perhaps re-open or clone it for a
cleanup of logging settings and changing a default.
( btw, I tried to go that path yesterday, but soon waded into trouble,
requiring thorough testing :)

If I'm counting correctly, it needs one more vote.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

--- Comment #14 from Daniel <le...@jam-software.com> 2010-02-17 07:55:27 UTC ---
+1 for 3.3.1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6267] [review] Solaris 10 requires --syslog-socket=native

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6267

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #16 from Mark Martinec <Ma...@ijs.si> 2010-03-10 02:54:08 UTC ---
> > Suggesting to go with the minimal change r910376 + r910488 for 3.3.1

3.3:

Bug 6267: Solaris 10 requires --syslog-socket=native
Sending lib/Mail/SpamAssassin/Logger/Syslog.pm
Sending spamd/spamd.raw
Committed revision 921213.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.