On 12/09/13 08:41, Jason McIntyre wrote:
On Sun, Dec 08, 2013 at 07:59:48PM +0100, Maurice Janssen wrote:
Hi,
If I understand the man pages correctly, you should start both spamd and
spamd-setup with the -b option when you want to use spamd in blacklist only
mode.
In /etc/rc.d/spamd, the -b option is set when you have spamd_black=yes in
your rc.conf.local.
However, spamd-setup is always started with -D only from /etc/rc. It doesn't
check for the spamd_black environment variable and therefore set -b.
So it seems that you have to adapt /etc/rc when you want to run spamd in
blacklist only mode.
This seems a bit odd, doesn't it? Am I missing something, or is this
intended?
Thanks,
Maurice
you shouldn;t have to mess about with the rc.d stuff at all.
you run spamd with the -b flag on the command line, or set spamd_black
in rc.conf.local.
then, following through the man page:
spamd-setup(8) should be run periodically by cron(8). When
run in blacklist-only mode, the -b flag should be specified.
Use crontab(1) to uncomment the entry in root's crontab.
hope that's clear.
jmc
Thanks, the cron part is clear. When spamd-setup is run from cron (with
-b), spamd-setup downloads the blacklists as configured in spamd.conf
and sends the data to the pf table <spamd> and to the spamd process. So
far so good.
But when spamd-setup is run during boot from /etc/rc (without -b), it
doesn't send the IPs from the blacklists to pf. Therefore, connections
from blacklisted IP's are not redirected to spamd and spamd is not
operational until spamd-setup is run from crontab (with -b). This can
take up to an hour with the default crontab entry. Not a big deal, but
annoying.
So why not check for spamd_black in /etc/rc and run spamd-setup with -b
in case it is set?
Maurice