summaryrefslogtreecommitdiffstats
path: root/network/opensmtpd/rc.opensmtpd
diff options
context:
space:
mode:
Diffstat (limited to 'network/opensmtpd/rc.opensmtpd')
-rw-r--r--network/opensmtpd/rc.opensmtpd13
1 files changed, 11 insertions, 2 deletions
diff --git a/network/opensmtpd/rc.opensmtpd b/network/opensmtpd/rc.opensmtpd
index b75e3c53e4..f3154061c5 100644
--- a/network/opensmtpd/rc.opensmtpd
+++ b/network/opensmtpd/rc.opensmtpd
@@ -10,7 +10,7 @@ smtpd_start() {
smtpd_stop() {
echo "Stopping OpenSMTPD"
- /usr/sbin/smtpctl stop 1>/dev/null 2>/dev/null || /usr/bin/pkill smtpd
+ /usr/bin/pkill -f /usr/sbin/smtpd
}
# Restart smtpd:
@@ -20,6 +20,12 @@ smtpd_restart() {
smtpd_start
}
+# Test the smtpd configuration:
+smtpd_testconf() {
+ echo "testing OpenSMTPD configuration: /usr/sbin/smtpd -n"
+ /usr/sbin/smtpd -n
+}
+
case "$1" in
'start')
smtpd_start
@@ -30,6 +36,9 @@ case "$1" in
'restart')
smtpd_restart
;;
+'testconf')
+ smtpd_testconf
+ ;;
*)
- echo "usage $0 start|stop|restart"
+ echo "usage $0 start|stop|restart|testconf"
esac