How to set environment variable for a port daemon?

Doug Lee dgl at dlee.org
Sat Mar 19 02:36:59 PST 2005


SpamAssassin now recommends an environment variable setting like
"export LANG=en_US" be made when unicode support is not needed, for
performance reasons, as of the migration to Perl 5.8, which uses
unicode by default at some expense to SpamAssassin's performance.  I'm
trying to figure out the best way to make that setting apply to spamd,
the SpamAssassin daemon.  From my read of docs and my scan of
/usr/local/etc/rc.subr, I don't think throwing the setting into
spamd_flags in /etc/rc.conf will work; that would look like this:

spamd_flags="LANG=en_US -c -d -m 3 -r /var/run/spamd.pid"

but I'm hoping either I'm wrong or there's a similarly easy solution.

Reason for interest:  I'm running SpamAssassin on an old P166, and as
of my latest port upgrade, its performance dropped dramatically, and
it actually began interfering with day-to-day activities on this old
box.  I'm hoping the unicode evasion will help with that, though I
don't know how likely this is.

Please Cc replies to me.

Thanks much for any advice.


-- 
Doug Lee           dgl at dlee.org        http://www.dlee.org
Bartimaeus Group   doug at bartsite.com   http://www.bartsite.com
"Believe, when you are most unhappy, that there is something for you
to do in the world. So long as you can sweeten another's pain, life is
not in vain." --Helen Keller


More information about the freebsd-questions mailing list