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 2010/01/13 15:53:05 UTC

Spamd startup locale question

SpamAssassin Server version 3.2.5
  running on Perl 5.8.8
  with zlib support (Compress::Zlib 2.011)
SunOS ornl72 5.9 Generic_122300-07 sun4u sparc SUNW,Sun-Fire-V240

What causes the following error message when restarting spamd?

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LC_ALL = (unset),
	LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

This happens on some, but not all, of our systems running spamd.  All the startup files contain

LANG=en_US
export LANG

Thanks,
Larry

Re: Spamd startup locale question

Posted by Justin Mason <jm...@jmason.org>.
I'm not sure -- I've seen that (generally with UTF-8 locales).   I
think it may be missing locale data in the OS install.

On Wed, Jan 13, 2010 at 14:53, Rosenbaum, Larry M. <ro...@ornl.gov> wrote:
> SpamAssassin Server version 3.2.5
>  running on Perl 5.8.8
>  with zlib support (Compress::Zlib 2.011)
> SunOS ornl72 5.9 Generic_122300-07 sun4u sparc SUNW,Sun-Fire-V240
>
> What causes the following error message when restarting spamd?
>
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>        LC_ALL = (unset),
>        LANG = "en_US"
>    are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
>
> This happens on some, but not all, of our systems running spamd.  All the startup files contain
>
> LANG=en_US
> export LANG
>
> Thanks,
> Larry
>
>



-- 
--j.

Re: Spamd startup locale question

Posted by Bob Proulx <bo...@proulx.com>.
Rosenbaum, Larry M. wrote:
> SpamAssassin Server version 3.2.5
>   running on Perl 5.8.8
>   with zlib support (Compress::Zlib 2.011)
> SunOS ornl72 5.9 Generic_122300-07 sun4u sparc SUNW,Sun-Fire-V240
> 
> What causes the following error message when restarting spamd?
> 
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> 	LC_ALL = (unset),
> 	LANG = "en_US"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").

Perl emits that error when it cannot find the locale files for the
specified locale.  It appears that on those machines the en_US locale
is not configured.  You can double check this manually using something
like the following command.

  $ LANG=en_US perl -e 0

The '-e 0' executes a very small perl script "0" which doesn't do
anything.  But when perl loads it will perform startup code looking
for the locale just the same.  If you get an error then it verifies
that the locale is not installed.  At least not for perl.

Note that en_US probably isn't the best locale for you to use.  For
your own personal use you would probably want en_US.UTF-8 instead.
That is probably why it emits this error on some of your machines.
Those probably do not have en_US available because they probably have
en_US.UTF-8 available instead.

  $ LANG=en_US.UTF-8 perl -e 0

> This happens on some, but not all, of our systems running spamd.
> All the startup files contain
> 
> LANG=en_US
> export LANG

Instead of setting "en_US" in the startup script I think you might be
better served by setting "C" (aka "POSIX") there instead.  Or perhaps
unsetting it entirely.  Unset values default to C/POSIX.  It is
operating as a system daemon and I don't think needs any specific
locale set.  Better to use a standard one.  C/POSIX is standard while
the others are not.  Also the regular expression engine is much faster
in the standard locale.  And the standard locale should work on every
machine everywhere.

  $ LC_ALL=C perl -e 0

Bob