spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Proulx <>
Subject Re: Spamd startup locale question
Date Wed, 13 Jan 2010 17:15:26 GMT
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


View raw message