Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 629450
Collapse All | Expand All

(-)a/files/mimedefang.conf (-17 / +17 lines)
Lines 43-68 Link Here
43
# want to use it with MIMEDefang
43
# want to use it with MIMEDefang
44
# MX_MAP_SOCKET=$SPOOLDIR/map.sock
44
# MX_MAP_SOCKET=$SPOOLDIR/map.sock
45
45
46
# The multiplexor does not start all slaves at the same time.  Instead,
46
# The multiplexor does not start all workers at the same time.  Instead,
47
# it starts one slave every MX_SLAVE_DELAY seconds when the system is idle.
47
# it starts one worker every MX_WORKER_DELAY seconds when the system is idle.
48
# (If the system is busy, the multiplexor starts slaves as incoming mail
48
# (If the system is busy, the multiplexor starts workers as incoming mail
49
# requires attention.)
49
# requires attention.)
50
# MX_SLAVE_DELAY=3
50
# MX_WORKER_DELAY=3
51
51
52
# The next setting is an absolute limit on slave activation.  The multiplexor
52
# The next setting is an absolute limit on worker activation.  The multiplexor
53
# will NEVER activate a slave within MX_MIN_SLAVE_DELAY seconds of another.
53
# will NEVER activate a worker within MX_MIN_WORKER_DELAY seconds of another.
54
# The default of zero means that the multiplexor will activate slaves as
54
# The default of zero means that the multiplexor will activate workers as
55
# quickly as necessary to keep up with incoming mail.
55
# quickly as necessary to keep up with incoming mail.
56
# MX_MIN_SLAVE_DELAY=0
56
# MX_MIN_WORKER_DELAY=0
57
57
58
# Set to yes if you want the multiplexor to log stats in
58
# Set to yes if you want the multiplexor to log stats in
59
# /var/log/mimedefang/stats  The /var/log/mimedefang directory must
59
# /var/log/mimedefang/stats  The /var/log/mimedefang directory must
60
# exist and be writable by the user you're running MIMEDefang as.
60
# exist and be writable by the user you're running MIMEDefang as.
61
# MX_STATS=no
61
# MX_STATS=no
62
62
63
# Number of slaves reserved for connections from loopback.  Use -1
63
# Number of workers reserved for connections from loopback.  Use -1
64
# for default behaviour, 0 to allow loopback connections to queue,
64
# for default behaviour, 0 to allow loopback connections to queue,
65
# or >0 to reserve slaves for loopback connections
65
# or >0 to reserve workers for loopback connections
66
LOOPBACK_RESERVED_CONNECTIONS=-1
66
LOOPBACK_RESERVED_CONNECTIONS=-1
67
67
68
# Set to yes if you want the stats file flushed after each entry
68
# Set to yes if you want the stats file flushed after each entry
Lines 88-107 Link Here
88
# too low; we suggest 10 instead
88
# too low; we suggest 10 instead
89
MX_MAXIMUM=10
89
MX_MAXIMUM=10
90
90
91
# Uncomment to log slave status; it will be logged every
91
# Uncomment to log worker status; it will be logged every
92
# MX_LOG_SLAVE_STATUS_INTERVAL seconds
92
# MX_LOG_WORKER_STATUS_INTERVAL seconds
93
# MX_LOG_SLAVE_STATUS_INTERVAL=30
93
# MX_LOG_WORKER_STATUS_INTERVAL=30
94
94
95
# Uncomment next line to have busy slaves send status updates to the
95
# Uncomment next line to have busy workers send status updates to the
96
# multiplexor.  NOTE: Consumes one extra file descriptor per slave, plus
96
# multiplexor.  NOTE: Consumes one extra file descriptor per worker, plus
97
# a bit of CPU time.
97
# a bit of CPU time.
98
# MX_STATUS_UPDATES=yes
98
# MX_STATUS_UPDATES=yes
99
99
100
# Limit slave processes' resident-set size to this many kilobytes.  Default
100
# Limit worker processes' resident-set size to this many kilobytes.  Default
101
# is unlimited.
101
# is unlimited.
102
# MX_MAX_RSS=10000
102
# MX_MAX_RSS=10000
103
103
104
# Limit total size of slave processes' memory space to this many kilobytes.
104
# Limit total size of worker processes' memory space to this many kilobytes.
105
# Default is unlimited.
105
# Default is unlimited.
106
# MX_MAX_AS=30000
106
# MX_MAX_AS=30000
107
107
(-)a/files/mimedefang.init (-7 / +9 lines)
Lines 7-14 Link Here
7
prog='mimedefang'
7
prog='mimedefang'
8
PROGDIR=/usr/bin
8
PROGDIR=/usr/bin
9
SPOOLDIR='/var/spool/MIMEDefang'
9
SPOOLDIR='/var/spool/MIMEDefang'
10
PID="$SPOOLDIR/$prog.pid"
10
PID="/run/$prog.pid"
11
MXPID="$SPOOLDIR/$prog-multiplexor.pid"
11
MXPID="/run/$prog-multiplexor.pid"
12
LOCK="$SPOOLDIR/$prog.lock"
13
MXLOCK="$SPOOLDIR/$prog-multiplexor.lock"
12
14
13
# Make sure required vars are set
15
# Make sure required vars are set
14
SOCKET=${SOCKET:=$SPOOLDIR/$prog.sock}
16
SOCKET=${SOCKET:=$SPOOLDIR/$prog.sock}
Lines 41-47 Link Here
41
43
42
	ebegin "Starting mimedefang-multiplexor"
44
	ebegin "Starting mimedefang-multiplexor"
43
	start-stop-daemon --start --quiet \
45
	start-stop-daemon --start --quiet \
44
		--exec $PROGDIR/$prog-multiplexor -- -p $MXPID \
46
		--exec $PROGDIR/$prog-multiplexor -- -p $MXPID -o $MXLOCK \
45
		$EMBEDFLAG \
47
		$EMBEDFLAG \
46
		`[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \
48
		`[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \
47
		`[ -n "$FILTER" ] && echo "-f $FILTER"` \
49
		`[ -n "$FILTER" ] && echo "-f $FILTER"` \
Lines 50-62 Link Here
50
		`[ -n "$MX_MINIMUM" ] && echo "-m $MX_MINIMUM"` \
52
		`[ -n "$MX_MINIMUM" ] && echo "-m $MX_MINIMUM"` \
51
		`[ -n "$MX_MAXIMUM" ] && echo "-x $MX_MAXIMUM"` \
53
		`[ -n "$MX_MAXIMUM" ] && echo "-x $MX_MAXIMUM"` \
52
		`[ -n "$MX_MAP_SOCKET" ] && echo "-N $MX_MAP_SOCKET"` \
54
		`[ -n "$MX_MAP_SOCKET" ] && echo "-N $MX_MAP_SOCKET"` \
53
		`[ -n "$MX_LOG_SLAVE_STATUS_INTERVAL" ] && echo "-L $MX_LOG_SLAVE_STATUS_INTERVAL"` \
55
		`[ -n "$MX_LOG_WORKER_STATUS_INTERVAL" ] && echo "-L $MX_LOG_WORKER_STATUS_INTERVAL"` \
54
		`[ -n "$MX_USER" ] && echo "-U $MX_USER"` \
56
		`[ -n "$MX_USER" ] && echo "-U $MX_USER"` \
55
		`[ -n "$MX_IDLE" ] && echo "-i $MX_IDLE"` \
57
		`[ -n "$MX_IDLE" ] && echo "-i $MX_IDLE"` \
56
		`[ -n "$MX_BUSY" ] && echo "-b $MX_BUSY"` \
58
		`[ -n "$MX_BUSY" ] && echo "-b $MX_BUSY"` \
57
		`[ -n "$MX_REQUESTS" ] && echo "-r $MX_REQUESTS"` \
59
		`[ -n "$MX_REQUESTS" ] && echo "-r $MX_REQUESTS"` \
58
		`[ -n "$MX_SLAVE_DELAY" ] && echo "-w $MX_SLAVE_DELAY"` \
60
		`[ -n "$MX_WORKER_DELAY" ] && echo "-w $MX_WORKER_DELAY"` \
59
		`[ -n "$MX_MIN_SLAVE_DELAY" ] && echo "-W $MX_MIN_SLAVE_DELAY"` \
61
		`[ -n "$MX_MIN_WORKER_DELAY" ] && echo "-W $MX_MIN_WORKER_DELAY"` \
60
		`[ -n "$MX_MAX_RSS" ] && echo "-R $MX_MAX_RSS"` \
62
		`[ -n "$MX_MAX_RSS" ] && echo "-R $MX_MAX_RSS"` \
61
		`[ -n "$MX_MAX_AS" ] && echo "-M $MX_MAX_AS"` \
63
		`[ -n "$MX_MAX_AS" ] && echo "-M $MX_MAX_AS"` \
62
		`[ "$MX_LOG" = "yes" ] && echo "-l"` \
64
		`[ "$MX_LOG" = "yes" ] && echo "-l"` \
Lines 74-80 Link Here
74
	rm -f $SOCKET > /dev/null 2>&1
76
	rm -f $SOCKET > /dev/null 2>&1
75
	ebegin "Starting mimedefang"
77
	ebegin "Starting mimedefang"
76
	start-stop-daemon --start --quiet \
78
	start-stop-daemon --start --quiet \
77
		--exec $PROGDIR/$prog -- -P $PID \
79
		--exec $PROGDIR/$prog -- -P $PID -o $LOCK \
78
		-R $LOOPBACK_RESERVED_CONNECTIONS \
80
		-R $LOOPBACK_RESERVED_CONNECTIONS \
79
		-m $MX_SOCKET \
81
		-m $MX_SOCKET \
80
		`[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \
82
		`[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \

Return to bug 629450