From owner-freebsd-questions@FreeBSD.ORG Mon Nov 23 18:20:48 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68552106566B for ; Mon, 23 Nov 2009 18:20:48 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id EDC6B8FC12 for ; Mon, 23 Nov 2009 18:20:47 +0000 (UTC) Received: by ewy26 with SMTP id 26so2305410ewy.3 for ; Mon, 23 Nov 2009 10:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=YneefJjo4iU4Lo0kbkf9z5qhlpUnpo36BOqklU1X9fs=; b=VUYB39oHyHFE1x4RYE/mxI3r9nsqWmZ8WB8HXMq9QjvS514mi29OlrL3RfdcPLYUT7 yCbZ0xV3FnRliNRh1KA2tApt1RFm/R4nBh8eXev5zHcoShn7Ja9I8fyUC1dWhI/KyZIj iWrozrHS81ZskdMyNwfn0/WaAjcBgQGgmBLwc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=VssbREU7PjQtykEzOY5uTkL6XZ6+BPk+alj6JOpAYyHVYv2HeIsqbXf9RefizDMCfa npCPOV+V82bWrG6usleuY/E0ZNxc91OaOv+yU5lyFrTnNzq8t1WSf+WPPSYsXDS7QAaJ DLTg+VqeyYimGKqhIlWpO+Pl5WBEELi8Txvpg= Received: by 10.213.0.216 with SMTP id 24mr5096404ebc.55.1259000446995; Mon, 23 Nov 2009 10:20:46 -0800 (PST) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id 16sm2145288ewy.14.2009.11.23.10.20.45 (version=SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 10:20:45 -0800 (PST) Date: Mon, 23 Nov 2009 18:20:43 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20091123182043.42b70f1b@gumby.homeunix.com> In-Reply-To: References: <20091123012208.GA46908@thought.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: spamassassin question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 18:20:48 -0000 On Mon, 23 Nov 2009 02:30:47 +0000 Marwan Sultan wrote: > > Gary, > > > > Its an old problem with /root/.spamassassin > > I dunt know why spamassassin still have it by default :( > > I spent a day or so to figure it out.. however, > > If you run spamd as root it will setuid to the user running spamc and use ~/.spamassassin for user configuration - this is the normal way to set it up if you wish to use traditional unix mail accounts with per user conf (including bayes). Presumably this is why it used /root/.spamassassin, assuming that you ran spamc as root. Alternately you can use an unprivileged user either by letting it drop privileges, like this spamd_flags=" -u " or by starting it directly, with spamd_user=, since spamd will no longer be able to bind to the default port, you need to specify a high port in this case. And for some odd reason spamd still expects the -u option to be used. You can also add virtual users like this: spamd_flags=" -c -x -u --virtual-config-dir=/var/db/spamassassin/conf/%u" and then using: spamc -u in the above is the unprivileged user and is the virtual user which is substituted for %u in the above path. There are also numerous sql alternatives, but that's a bit more complicated.