Date: Mon, 23 Nov 2009 18:20:43 +0000 From: RW <rwmaillists@googlemail.com> To: freebsd-questions@freebsd.org Subject: Re: spamassassin question Message-ID: <20091123182043.42b70f1b@gumby.homeunix.com> In-Reply-To: <SNT103-W21759D8A65F8BA17AF8C399A9E0@phx.gbl> References: <20091123012208.GA46908@thought.org> <SNT103-W21759D8A65F8BA17AF8C399A9E0@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 23 Nov 2009 02:30:47 +0000 Marwan Sultan <dead_line@hotmail.com> 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 <unixuser>" or by starting it directly, with spamd_user=<unixuser>, 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 <unixuser> --virtual-config-dir=/var/db/spamassassin/conf/%u" and then using: spamc -u <vuser> in the above <unixuser> is the unprivileged user and <vuser> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091123182043.42b70f1b>