Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 524034

Summary: mail-filter/spampd - /etc/init.d/spampd always reports status as "stopped"
Product: Gentoo Linux Reporter: Stuart Shelton <srcshelton>
Component: [OLD] ServerAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: UNCONFIRMED ---    
Severity: normal CC: me, net-mail+disabled
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Stuart Shelton 2014-09-29 14:48:08 UTC
spampd is definitely not running:

# /etc/init.d/spampd status
 * status: stopped
# ps -ef | grep -i spam
root     11721 30682  0 15:07 pts/1    00:00:00 grep --colour=auto -i spam

... so we'll start it:

# /etc/init.d/spampd start
 * Starting spampd ... [ ok ]
# ps -ef | grep -i spam
mail     11788     1  2 15:07 ?        00:00:00 /usr/bin/perl -T /usr/sbin/spampd.pl --pid=/var/run/spampd.pid --host=localhost:8025 --relayhost=localhost:9025 --dose --set-envelope-headers --tagall
mail     11792 11788  0 15:07 ?        00:00:00 /usr/bin/perl -T /usr/sbin/spampd.pl --pid=/var/run/spampd.pid --host=localhost:8025 --relayhost=localhost:9025 --dose --set-envelope-headers --tagall
mail     11793 11788  0 15:07 ?        00:00:00 /usr/bin/perl -T /usr/sbin/spampd.pl --pid=/var/run/spampd.pid --host=localhost:8025 --relayhost=localhost:9025 --dose --set-envelope-headers --tagall
mail     11794 11788  0 15:07 ?        00:00:00 /usr/bin/perl -T /usr/sbin/spampd.pl --pid=/var/run/spampd.pid --host=localhost:8025 --relayhost=localhost:9025 --dose --set-envelope-headers --tagall
mail     11795 11788  0 15:07 ?        00:00:00 /usr/bin/perl -T /usr/sbin/spampd.pl --pid=/var/run/spampd.pid --host=localhost:8025 --relayhost=localhost:9025 --dose --set-envelope-headers --tagall
mail     11796 11788  0 15:07 ?        00:00:00 /usr/bin/perl -T /usr/sbin/spampd.pl --pid=/var/run/spampd.pid --host=localhost:8025 --relayhost=localhost:9025 --dose --set-envelope-headers --tagall
root     11804 30682  0 15:07 pts/1    00:00:00 grep --colour=auto -i spam

... and that looks good!  However:

# /etc/init.d/spampd status
 * status: crashed

... but regardless:

# /etc/init.d/spampd stop
 * Stopping spampd ... [ ok ]
# /etc/init.d/spampd status
 * status: stopped
# ps -ef | grep -i spam
root     11903 30682  0 15:08 pts/1    00:00:00 grep --colour=auto -i spam

... so spampd(.pl) is starting and stopping correctly, but OpenRC always thinks it's crashed (because it needs to be marked as --interpreted?) when it is in fact running correctly.

Suggest new init script similar to:

--- CUT ---
command="/usr/sbin/spampd.pl"
command_args="${SPAMPD_OPTS:-}"
piddir="/var/run"
pidfile="${piddir:-/var/run}/spampd.pid"
required_dirs="${piddir:-/var/run}"

depend() {
        use net
}
--- CUT ---

... which seems to be able to status-track correctly.
Comment 1 Stuart Shelton 2014-09-29 20:18:53 UTC
Bug title is now inaccurate - status is "crashed" instead of "stopped", so the states are "stopped" or "crashed", instead of "stopped", "started", or "crashed".
Comment 2 Benny Pedersen 2016-06-24 21:37:09 UTC
resolved ?