This file is indexed.

/etc/init.d/masqmail is in masqmail 0.2.30-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
#!/bin/sh
### BEGIN INIT INFO
# Provides:          masqmail
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts and stops the masqmail daemon
# Description:       The masqmail daemon listens on for incoming SMTP
#                    connections and processes its mail queue in regular
#                    intervals. Regular fetching of mail is possible too.
### END INIT INFO
# /etc/init.d/masqmail
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for exim by Tim Cutts <tjrc1@mole.bio.cam.ac.uk>
# Modified for masqmail by Gregor Hoffleit <flight@debian.org>
# Modified for masqmail by Oliver Kurth <oku@masqmail.cx>

# standards version 3.9.0 recommends to be careful with `set -e' in
# init scripts. See 9.3.2 of the policy for reference.
# TODO: We should investigate into this.
set -e

# If you disable this file, masqmail can be run from /etc/inetd.conf
#exit 0

# defaults, do not edit here but in
# /etc/default/masqmail
INIT_SMTP_DAEMON=true
INIT_QUEUE_DAEMON=true
INIT_FETCH_DAEMON=false
QUEUE_DAEMON_IVAL=-q10m
FETCH_DAEMON_IVAL=-go5m

RUN_DIR=/var/run/masqmail

[ -r /etc/default/masqmail ] && . /etc/default/masqmail

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/masqmail
NAME=masqmail
DESC="MTA (masqmail)"

test -x $DAEMON || exit 0

if [ ! -f /etc/masqmail/masqmail.conf ] ; then
    echo "you have to configure masqmail first."
    exit 0
fi

# Create /var/run/masqmail if /var/run/ is a tmpfs.
if [ ! -d $RUN_DIR ] ; then
    mkdir -p $RUN_DIR
fi

if [ x"$INIT_SMTP_DAEMON" = x"true" ] || [ x"$INIT_QUEUE_DAEMON" = x"true" ] ; then
    DAEMON_ARGS=
    if [ x"$INIT_SMTP_DAEMON" = x"true" ] ; then
	DAEMON_ARGS=-bd
    fi

    if [ x"$INIT_QUEUE_DAEMON" = x"true" ] ; then
	DAEMON_ARGS="$DAEMON_ARGS $QUEUE_DAEMON_IVAL"
    fi
    INIT_DAEMON=true
else
    INIT_DAEMON=false
fi

case "$1" in
  start)
    echo -n "Starting $DESC: "
    if [ x"$INIT_DAEMON" = x"true" ] ; then
	update-inetd --disable smtp
	start-stop-daemon --start --startas $DAEMON \
	    --pidfile $RUN_DIR/masqmail.pid -- $DAEMON_ARGS
	echo -n " listen/queue"
    fi
    if [ x"$INIT_FETCH_DAEMON" = x"true" ] ; then
	start-stop-daemon --start --startas $DAEMON \
	    --pidfile $RUN_DIR/masqmail-get.pid -- $FETCH_DAEMON_IVAL
	echo -n " fetch"
    fi
    echo "."
    ;;
  stop)
    echo -n "Stopping $DESC: "
    if [ -f $RUN_DIR/masqmail.pid ] ; then
	start-stop-daemon --stop --oknodo --retry 1 --name $NAME --pidfile $RUN_DIR/masqmail.pid
	update-inetd --enable smtp
	echo -n " listen/queue"
    fi
    if [ -f $RUN_DIR/masqmail-get.pid ] ; then
	start-stop-daemon --stop --oknodo --retry 1 --name $NAME --pidfile $RUN_DIR/masqmail-get.pid
	echo -n " fetch"
    fi
    echo "."
      ;;
  restart)
    $0 stop
    $0 start
    ;;
  reload|force-reload)
    echo -n "Reloading $DESC configuration files: "
    if [ -f $RUN_DIR/masqmail.pid ] ; then
	start-stop-daemon --stop --signal 1 --pidfile $RUN_DIR/masqmail.pid
	echo -n " listen/queue"
    fi
    if [ -f $RUN_DIR/masqmail-get.pid ] ; then
	start-stop-daemon --stop --signal 1 --pidfile $RUN_DIR/masqmail-get.pid
	echo -n " fetch"
    fi
    echo "."
    ;;
  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
    exit 1
    ;;
esac

exit 0