Package: mimedefang / 3.5-1

init.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
--- a/examples/init-script.in
    b/examples/init-script.in
@@ -1,5  1,13 @@
 #!/bin/sh
 #
 ### BEGIN INIT INFO
 # Provides:          mimedefang
 # Required-Start:    $remote_fs $syslog
 # Required-Stop:     $remote_fs $syslog
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 ### END INIT INFO
 #
 # FreeBSD/NetBSD start/stop script for MIMEDefang.
 #
 # PROVIDE: mimedefang
@@ -7,6  15,7 @@
 # BEFORE: mail
 # KEYWORD: shutdown
 
 unset HOME
 RETVAL=0
 prog='mimedefang'
 SPOOLDIR='@SPOOLDIR@'
@@ -36,7  45,7 @@ LC_ALL=C
 export LC_ALL
 
 # The settings which follow are defaults.  You can override them by
-# placing assignments in @CONFDIR_EVAL@/mimedefang.conf
 # placing assignments in @CONFDIR_EVAL@/default/mimedefang
 
 # The socket used by mimedefang to communicate with sendmail
 # SOCKET=$SPOOLDIR/mimedefang.sock
@@ -177,10  186,14 @@ MX_RECIPOK_PERDOMAIN_LIMIT=0
 # SUBFILTER specifies which filter rules file to use
 # SUBFILTER=@CONFDIR_EVAL@/mimedefang-filter
 
 # The contents of the "X-Scanned-By" header added to each mail.  Do
 # not use the quote mark (') in this setting.  Setting it to "-"
 # prevents the header from getting added at all.
 # X_SCANNED_BY="MIMEDefang N.NN (www . roaringpenguin . com / mimedefang)"
 
 # Source configuration
-if [ -f @CONFDIR_EVAL@/$prog.conf ] ; then
-    . @CONFDIR_EVAL@/$prog.conf
 if [ -f @CONFDIR_EVAL@/default/$prog ] ; then
     . @CONFDIR_EVAL@/default/$prog
 fi
 
 # BSD specific setup
@@ -283,6  296,9 @@ start_it() {
 	`[ "$KEEP_FAILED_DIRECTORIES" = "yes" ] && echo "-k"` \
 	`[ "$MD_EXTRA" != "" ] && echo $MD_EXTRA` \
 	`[ "$MD_SKIP_BAD_RCPTS" = "yes" ] && echo "-N"` \
  	"`[ -n "$X_SCANNED_BY" ] && \
 	        ( [ "$X_SCANNED_BY" = "-" ] && \
 		        echo "-X" || echo "-x$X_SCANNED_BY" )`" \
 	`[ "$MD_ALLOW_GROUP_ACCESS" = "yes" ] && echo "-G"` \
 	`[ "$ALLOW_NEW_CONNECTIONS_TO_QUEUE" = "yes" ] && echo "-q"` \
 	-p $SOCKET
@@ -303,6  319,9 @@ stop_it() {
     if test -f "$PID" ; then
 	kill `cat $PID`
 	RETVAL=$?
 	# killing the parent does not work when the children are still
 	# running
 	killall $PROGDIR/$prog
     else
 	RETVAL=1
     fi
@@ -395,10  414,10 @@ case "$1" in
     ;;
 
   stop)
-  stop_it $2
   stop_it wait
     ;;
 
-  restart)
   restart|force-reload)
     stop_it wait
     start_it
     RETVAL=$?
@@ -409,7  428,7 @@ case "$1" in
     ;;
 
   *)
-    echo "Usage: $0 {start|stop|restart|reread|reload}"
     echo "Usage: $0 {start|stop|restart|force-reload|reread|reload}"
     exit 1
 esac
 
--- a/systemd-units/mimedefang-multiplexor.service
    b/systemd-units/mimedefang-multiplexor.service
@@ -6,7  6,8 @@ After=systemd-journald-dev-log.socket
 PartOf=mimedefang.service
 
 [Service]
-Type=simple
 Type=forking
 PIDFile=/run/mimedefang/mimedefang-multiplexor.pid
 Restart=on-failure
 TimeoutStopSec=30s
 KillMode=mixed
@@ -16,8  17,12 @@ EnvironmentFile=-/etc/default/mimedefang
 EnvironmentFile=-/etc/sysconfig/mimedefang
 # This can be removed with MIMEDefang 2.82, but is required for older versions:
 # SuccessExitStatus=1
 ExecStartPre=/bin/rm -f $MX_SOCKET
 ExecStartPre=/bin/sh -c '/usr/bin/install -d \
     `[ -n "$MX_USER" ] && echo "-o $MX_USER"` \
     /run/mimedefang'
 ExecStart=/bin/sh -c 'HOME=${SPOOLDIR:=/var/spool/MIMEDefang} \
-    exec /usr/bin/mimedefang-multiplexor -D \
     exec /usr/bin/mimedefang-multiplexor \
     `[ "$MX_EMBED_PERL" = "yes" ] && echo "-E"` \
     `[ -n "$SPOOLDIR" ] && echo "-z $SPOOLDIR"` \
     `[ -n "$FILTER" ] && echo "-f $FILTER"` \
@@ -46,7  51,6 @@ ExecStart=/bin/sh -c 'HOME=${SPOOLDIR:=/
     `[ -n "$MX_QUEUE_TIMEOUT" ] && echo "-Q $MX_QUEUE_TIMEOUT"` \
     `[ -n "$MX_NOTIFIER" ] && echo "-O $MX_NOTIFIER"` \
     `[ -n "$MX_RECIPOK_PERDOMAIN_LIMIT" ] && echo "-y $MX_RECIPOK_PERDOMAIN_LIMIT"` \
-    -s $MX_SOCKET'
-ExecStartPre=/bin/rm -f $MX_SOCKET
     -s $MX_SOCKET -p /run/mimedefang/mimedefang-multiplexor.pid'
 ExecStopPost=/bin/rm -f $MX_SOCKET
 ExecReload=/bin/kill -INT $MAINPID
--- a/systemd-units/mimedefang.service
    b/systemd-units/mimedefang.service
@@ -11,7  11,8 @@ After=mimedefang-multiplexor.service
 PropagatesReloadTo=mimedefang-multiplexor.service
 
 [Service]
-Type=simple
 Type=forking
 PIDFile=/run/mimedefang/mimedefang.pid
 Restart=on-failure
 TimeoutStopSec=30s
 # LC_ALL=C may not be necessary for mimedefang, but it is for
@@ -20,7  21,7 @@ Environment=LC_ALL=C MX_SOCKET=/var/spoo
 EnvironmentFile=-/etc/default/mimedefang
 EnvironmentFile=-/etc/sysconfig/mimedefang
 ExecStartPre=/bin/rm -f $SOCKET
-ExecStart=/bin/sh -c 'exec /usr/bin/mimedefang -D \
 ExecStart=/bin/sh -c 'exec /usr/bin/mimedefang \
     `[ -n "$LOOPBACK_RESERVED_CONNECTIONS" ] && echo "-R $LOOPBACK_RESERVED_CONNECTIONS"` \
     -m $MX_SOCKET \
     `[ "$USE_SETSYMLIST" = "yes" ] && echo "-y"` \
@@ -39,7  40,7 @@ ExecStart=/bin/sh -c 'exec /usr/bin/mime
         echo "-X" || echo "-x$X_SCANNED_BY" )`" \
     `[ "$MD_ALLOW_GROUP_ACCESS" = "yes" ] && echo "-G"` \
     `[ "$ALLOW_NEW_CONNECTIONS_TO_QUEUE" = "yes" ] && echo "-q"` \
-    -p $SOCKET'
     -p $SOCKET -P /run/mimedefang/mimedefang.pid'
 ExecStopPost=/bin/rm -f $SOCKET
 # Make this service eligible for a reload, so we can propagate it to
 # mimedefang-multiplexor.service.