From owner-freebsd-questions@FreeBSD.ORG Sat Mar 19 15:08:10 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 650B916A4CE for ; Sat, 19 Mar 2005 15:08:10 +0000 (GMT) Received: from ns1.tiadon.com (SMTP.tiadon.com [69.27.132.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id D943543D2F for ; Sat, 19 Mar 2005 15:08:09 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from [69.27.131.0] ([69.27.131.0]) by ns1.tiadon.com with Microsoft SMTPSVC(6.0.3790.211); Sat, 19 Mar 2005 09:11:28 -0600 Message-ID: <423C4057.8030707@daleco.biz> Date: Sat, 19 Mar 2005 09:08:07 -0600 From: Kevin Kinsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Doug Lee References: <20050319103648.GW4670@kirk.dlee.org> In-Reply-To: <20050319103648.GW4670@kirk.dlee.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Mar 2005 15:11:28.0837 (UTC) FILETIME=[ED078750:01C52C95] cc: freebsd-questions@freebsd.org Subject: Re: How to set environment variable for a port daemon? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Mar 2005 15:08:10 -0000 Doug Lee wrote: >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. > > Hmm, I'm not into rc scripts much, a dunno about the rc.conf flags question. An alternative, nasty hack/kluge that comes to mind might be to disable the rc script and start spamd from cron with the "@reboot" target, where you could specify your environment vars on the command line I dunno if that might mess stuff up, in terms of either startup order nor what would happen at shutdown, though. Like I said, it's kind of a nasty hack. But I'm pretty good at those, it seems. Good luck. Kevin Kinsey