SpamD v4.3.7 on 1.2.1-RC1
-
That your restart attempts on spamd seem to consistently report events like
killall: warning: kill -TERM 96371: No such process
suggests to me that one or two processes that the spamd restart is supposed to start are not staying running.
An earlier reply showed
rc_start() {
/sbin/mount_fdescfs fdescfs /dev/fd
/usr/local/sbin/spamd-setup -d &
/sbin/pflogd &
/usr/local/libexec/spamd -G 25:4:864 -n "pfsense" -c 800 -B 700 -w 1 127.0.0.1 &
/usr/local/libexec/spamlogdSo after the spamd startup has completed spamd-setup, pflogd, spamd and spamlogd should have been started. I have only the vaguest knowledge of spamd so based only on conventions I have observed, I would expect pflogd, spamd and spamlogd to continue running in the background. An inspection of the stop function in /usr/local/etc/rc.d/spamd.sh should give clues to which processes should still be running. The ps command can then be used to check they are running. If you find any of the programs not running try starting it by typing the corresponding command in rc_start() - you might get some clues why the program didn't continue running. A few weeks ago I was chasing a problem with bandwidthd not staying running. It was only when I tried starting it by shell command that I discovered the problem was missing libraries.
The name spamd-setup suggests spamd-setup might perform purely an initialisation function and so exit when it has completed that. But the rc_start() function starts a number of processes asynchronously. So what if spamd starts BEFORE spamd-setup has completed its initialisation? (This question can be difficult to answer. Sometimes clues are left in log files.) spamd might exit (even exit quietly) if it starts before necessary initialisation has completed. You might have this problem if everything starts and stays running when you start the programs individually by shell command but find that one or more programs don't stay running when started by /usr/local/etc/rc.d/spamd.sh
-
Thanks for your response, I have done as you suggested and ran the commands manually to try and find out where it may be going wrong but am having trouble interpreting the results.
cat /usr/local/etc/rc.d/spamd.sh
#!/bin/sh
This file was automatically generated
by the pfSense service handler.
rc_start() {
/sbin/mount_fdescfs fdescfs /dev/fd
/usr/local/sbin/spamd-setup -d &
/sbin/pflogd &
/usr/local/libexec/spamd -G 25:4:864 -n "mail.cheeyboofs.co.uk" -c 800 -B 100 127.0.0.1 &
/usr/local/libexec/spamlogd}
rc_stop() {
/usr/bin/killall spamd-setup
/usr/bin/killall spamlogd
/usr/bin/killall spamd
/usr/bin/killall pflogd
sleep 2
}case $1 in
start)
rc_start
;;
stop)
rc_stop
;;
restart)
rc_stop
rc_start
;;
esac–------------------------------------------------------
/sbin/mount_fdescfs fdescfs /dev/fd
/usr/local/sbin/spamd-setup -d &
[1] 74419
whitelist whitelist 0 entries
blacklist blacklist 0 entries
#/sbin/pflogd &
[2] 74458
[1] Done
#/usr/local/sbin/spamd-setup -d/usr/local/libexec/spamd -G 25:4:864 -n "mail.cheeyboofs.co.uk" -c 800 -B 100 127.0.0.1 &
[3] 74581
[2] Done
#/sbin/pflogd/usr/local/libexec/spamlogd
[3] + Done
#/usr/local/libexec/spamd -G 25:4:864 -n mail.cheeyboofs.co.uk -c 800 -B 100 …–------------------------------------------------------
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
1829 root 4 44 20 3596K 1088K select 0:55 0.00% slbd
1675 root 1 8 20 3484K 1624K wait 0:25 0.00% sh
1531 root 1 8 20 3132K 800K nanslp 0:07 0.00% check_reload_status
1469 _ntp 1 44 0 3132K 1224K select 0:05 0.00% ntpd
857 root 1 4 0 44824K 18140K accept 0:04 0.00% php
1450 dhcpd 1 44 0 3132K 2140K select 0:04 0.00% dhcpd
847 root 1 4 0 5072K 2828K kqread 0:03 0.00% lighttpd
545 root 1 44 0 4892K 3460K select 0:02 0.00% openvpn
452 root 1 -58 0 5696K 1848K bpf 0:01 0.00% tcpdump
393 _dhcp 1 44 0 3132K 1264K select 0:01 0.00% dhclient
316 _dhcp 1 44 0 3132K 1260K select 0:01 0.00% dhclient
856 root 1 4 0 45848K 18380K accept 0:01 0.00% php
924 nobody 1 44 0 3132K 1340K select 0:01 0.00% dnsmasq
68801 root 1 44 0 7736K 3276K select 0:00 0.00% sshd
1478 root 1 8 0 3212K 1256K nanslp 0:00 0.00% cron
71932 root 1 44 0 7736K 3188K select 0:00 0.00% sshd
1470 root 1 44 0 3132K 1216K select 0:00 0.00% ntpd
68843 root 1 44 0 4912K 2292K select 0:00 0.00% sftp-server
1533 root 1 8 0 3132K 888K nanslp 0:00 0.00% minicron
70234 root 1 44 0 3240K 1272K select 0:00 0.00% syslogd
72751 root 1 20 0 4524K 2380K pause 0:00 0.00% tcsh
118 root 1 44 0 1888K 452K select 0:00 0.00% devd
852 root 1 8 0 39704K 5236K wait 0:00 0.00% php
853 root 1 8 0 39704K 5236K wait 0:00 0.00% php
77733 root 1 44 0 3516K 1888K RUN 0:00 0.00% top
1568 root 1 8 0 3488K 1448K wait 0:00 0.00% login
1569 root 1 8 0 3488K 1448K wait 0:00 0.00% login
72081 root 1 -8 0 3132K 772K piperd 0:00 0.00% sshlockout_pf
72087 root 1 8 0 3484K 1336K wait 0:00 0.00% sh
72088 root 1 8 0 3484K 1348K wait 0:00 0.00% sh
68842 root 1 8 0 3484K 1324K wait 0:00 0.00% sh
1572 root 1 5 0 3484K 1344K ttyin 0:00 0.00% sh
77109 _spamd 1 8 0 13788K 4972K nanslp 0:00 0.00% spamd
1573 root 1 5 0 3484K 1344K ttyin 0:00 0.00% sh
1570 root 1 8 0 3484K 1336K wait 0:00 0.00% sh
1571 root 1 8 0 3484K 1336K wait 0:00 0.00% sh
77107 _pflogd 1 -58 0 3344K 1388K bpf 0:00 0.00% pflogd–------------------------------------------------------
/usr/bin/killall spamd-setup
No matching processes were found
/usr/bin/killall spamlogd
/usr/bin/killall spamd
killall: warning: kill -TERM 74582: No such process
/usr/bin/killall pflogd
–------------------------------------------------------
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
1829 root 4 44 20 3596K 1088K select 0:55 0.00% slbd
1675 root 1 8 20 3484K 1624K wait 0:26 0.00% sh
1531 root 1 8 20 3132K 800K nanslp 0:07 0.00% check_reload_status
1469 _ntp 1 44 0 3132K 1224K select 0:06 0.00% ntpd
857 root 1 4 0 44824K 18140K accept 0:04 0.00% php
1450 dhcpd 1 44 0 3132K 2140K select 0:04 0.00% dhcpd
847 root 1 4 0 5072K 2828K kqread 0:03 0.00% lighttpd
545 root 1 44 0 4892K 3460K select 0:02 0.00% openvpn
452 root 1 -58 0 5696K 1848K bpf 0:01 0.00% tcpdump
393 _dhcp 1 44 0 3132K 1264K select 0:01 0.00% dhclient
316 _dhcp 1 44 0 3132K 1260K select 0:01 0.00% dhclient
856 root 1 4 0 45848K 18380K accept 0:01 0.00% php
924 nobody 1 44 0 3132K 1340K select 0:01 0.00% dnsmasq
68801 root 1 44 0 7736K 3276K select 0:00 0.00% sshd
1478 root 1 8 0 3212K 1256K nanslp 0:00 0.00% cron
71932 root 1 44 0 7736K 3188K select 0:00 0.00% sshd
1470 root 1 44 0 3132K 1216K select 0:00 0.00% ntpd
68843 root 1 44 0 4912K 2292K select 0:00 0.00% sftp-server
1533 root 1 8 0 3132K 888K nanslp 0:00 0.00% minicron
70234 root 1 44 0 3240K 1280K select 0:00 0.00% syslogd
72751 root 1 20 0 4524K 2380K pause 0:00 0.00% tcsh
118 root 1 44 0 1888K 452K select 0:00 0.00% devd
852 root 1 8 0 39704K 5236K wait 0:00 0.00% php
853 root 1 8 0 39704K 5236K wait 0:00 0.00% php
78295 root 1 44 0 3516K 1756K RUN 0:00 0.00% top
1568 root 1 8 0 3488K 1448K wait 0:00 0.00% login
1569 root 1 8 0 3488K 1448K wait 0:00 0.00% login
72081 root 1 -8 0 3132K 772K piperd 0:00 0.00% sshlockout_pf
72087 root 1 8 0 3484K 1336K wait 0:00 0.00% sh
72088 root 1 8 0 3484K 1348K wait 0:00 0.00% sh
68842 root 1 8 0 3484K 1324K wait 0:00 0.00% sh
1572 root 1 5 0 3484K 1344K ttyin 0:00 0.00% sh
1573 root 1 5 0 3484K 1344K ttyin 0:00 0.00% sh
1570 root 1 8 0 3484K 1336K wait 0:00 0.00% sh
1571 root 1 8 0 3484K 1336K wait 0:00 0.00% sh
250 root 1 44 0 5020K 2812K select 0:00 0.00% sshd
453 root 1 -8 0 3132K 728K piperd 0:00 0.00% logger–------------------------------------------------------
And I can't seem to find out what
spamd[73273]: /sbin/pfctl returned status 1
means, is it a good thing or bad thing?
-
I have now given up on the Spamd package :( I have found a free package to install on the exchange server its self that does the same thing and does it well JEP(S) http://www.proxmea.com/?q=node/19
Cheers -
I'll add an explanation in italics for some of the things you saw.
Thanks for your response, I have done as you suggested and ran the commands manually to try and find out where it may be going wrong but am having trouble interpreting the results.
/sbin/mount_fdescfs fdescfs /dev/fd
/usr/local/sbin/spamd-setup -d &
[1] 74419
The & on the end of the command causes it to run in the background without the shell waiting for it to complete. The command runs in process 74419whitelist whitelist 0 entries
blacklist blacklist 0 entries
#/sbin/pflogd &
[2] 74458
[1] Done
process 74419 has exited: spamd-setup has completed
#/usr/local/sbin/spamd-setup -d/usr/local/libexec/spamd -G 25:4:864 -n "mail.cheeyboofs.co.uk" -c 800 -B 100 127.0.0.1 &
[3] 74581
spamd is running in process 74581
[2] Done
pflogd has exited. This is suspicious. Perhaps there was already a pflogd running.
#/sbin/pflogd
Run pflogd, this time wait for its completion./usr/local/libexec/spamlogd
Now that the previous command (pflogd) has completed run spamlogd and wait for its completion.
[3] + Done
process 74581, spamd, has completed
#/usr/local/libexec/spamd -G 25:4:864 -n mail.cheeyboofs.co.uk -c 800 -B 100 …And I can't seem to find out what
spamd[73273]: /sbin/pfctl returned status 1
means, is it a good thing or bad thing?
It probably means pfctl exited with status 1 which could be a status unique to pfctl or it could be pfctl reporting that it got an unexpected error return status 1 (EPERM, permission error) from a system call.
As I suspected spamd is exiting rather than continuing to run in the background. If you wanted to explore this further you could consult the spamd manual page by typing spamd into the man page or keyword search box at http://www.openbsd.org/cgi-bin/man.cgi (spamd came to FreeBSD from OpenBSD) and look for the command options for getting more output from spamd). If you don't already know your way around a Unix system you probably have a fair bit of learning if you want to pursue this further.
-
I have now given up on the Spamd package :( I have found a free package to install on the exchange server its self that does the same thing and does it well JEP(S) http://www.proxmea.com/?q=node/19
Cheerswhat's the free version lacking over the paid version? (out of curiosity, run an exchange box as well)
-
Hi,
Not much.
It does what it should, all the rest is just garnish! The one thing missing in the free version is auto white listing, so if for instance you don't get another eBay mail in a certain amount of time it will be automatically gray listed again. But you will still get the mail because of course the eBay server will keep trying. So far out of 1468 mails, 1405 have been blocked. I was a bit unsure about installing a third part app on my exchange server but it does seem quite un-intrusive and easy to remove should I want to and until I can get SpamD working I have no choice.
Cheers
-
It says it can use sender/recipient e-mails as qualifiers, can you white list a sender e-mail with that program? Perhaps not with the free version..
-
Yes you can.
-
This thread is veering entirely off topic.
-
@submicron:
This thread is veering entirely off topic.
You're entirely correct, my apologies.