This file is indexed.

/etc/init.d/courier-imap-ssl is in courier-imap-ssl 4.10.0-20120615-1ubuntu7.

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
124
125
126
127
#! /bin/bash -e
### BEGIN INIT INFO
# Short-Description: Courier IMAP-SSL server
# Provides:          courier-imap-ssl
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Description:       courier-imap is an IMAP Mail Delivery Agent with SSL.
### END INIT INFO
prefix="/usr"
exec_prefix=${prefix}
sysconfdir="/etc/courier"
bindir="${exec_prefix}/bin"
sbindir="${exec_prefix}/sbin"
libexecdir="${prefix}/lib/courier"
run_dir="/var/run/courier"
calendar_dir="/var/run/courier/calendar"
TCPD=${sbindir}/couriertcpd
DAEMONPROG=${sbindir}/imapd
DAEMON=imapd-ssl
PROGRAM="Courier IMAP-SSL server"

# first of all check if daemon is available
if ! [ -x "${bindir}/imapd" ]; then
	exit 0
fi

# load LSB functions
. /lib/lsb/init-functions

if [ ! -d ${run_dir} ]; then
	mkdir -p ${run_dir}
	chown daemon:daemon ${run_dir}
fi

if [ ! -d ${calendar_dir} ]; then
	mkdir -p ${calendar_dir}
	chown daemon:daemon ${calendar_dir}
fi


if ! [ -x $TCPD ]; then
	log_action_msg "$PROGRAM: ERROR - $TCPD missing"
	exit 1
fi

if ! [ -f ${sysconfdir}/imapd ]; then
	log_action_msg "$PROGRAM: ERROR - imapd configuration file missing"
	exit 1
fi

if ! [ -f ${sysconfdir}/imapd-ssl ]; then
	log_action_msg "$PROGRAM: ERROR - imapd-ssl configuration file missing"
	exit 1
fi

# read/set defaults
if [ -f /etc/default/courier ]; then
	. /etc/default/courier
fi
# ensure that maildirpath is set
if [ -z "$MAILDIRPATH" ]; then
	MAILDIRPATH=Maildir
fi

. ${sysconfdir}/imapd
. ${sysconfdir}/imapd-ssl

# ensure that umask is set
if [ -z "$IMAP_UMASK" ]; then
	IMAP_UMASK=022
fi

if ! [ -x $COURIERTLS ]; then
	log_action_msg "$PROGRAM: ERROR - $COURIERTLS missing"
	exit 1
fi

START=no
case "$IMAPDSSLSTART" in
	[yY]*)START=yes;;
esac

case "$1" in
	start)
	if [ "$START" = "yes" ]; then
		log_daemon_msg "Starting $PROGRAM" "$DAEMON"

		umask $IMAP_UMASK
		ulimit -v $IMAP_ULIMITD
		/usr/bin/env - /bin/sh -c " . ${sysconfdir}/imapd ; \
		. ${sysconfdir}/imapd-ssl ; \
		IMAP_TLS=1 ; export IMAP_TLS ; \
		`sed -n '/^#/d;/=/p' <${sysconfdir}/imapd | \
			sed 's/=.*//;s/^/export /;s/$/;/'`
		`sed -n '/^#/d;/=/p' <${sysconfdir}/imapd-ssl | \
			sed 's/=.*//;s/^/export /;s/$/;/'`
		PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
		/usr/sbin/courierlogger -pid=$SSLPIDFILE -start $SSLLOGGEROPTS \
		$TCPD -address=$SSLADDRESS \
			-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
			$TCPDOPTS \
			$SSLPORT $COURIERTLS -server -tcpd \
			${libexecdir}/courier/imaplogin \
				${bindir}/imapd $MAILDIRPATH"
		log_end_msg 0
	fi
	;;
	stop)
	log_daemon_msg "Stopping $PROGRAM" "$DAEMON"
	/usr/sbin/courierlogger -pid=$SSLPIDFILE -stop
	log_end_msg 0
	;;
	restart | force-reload)
	$0 stop
	$0 start
	;;
	status)
	status_of_proc -p $SSLPIDFILE $DAEMON "$PROGRAM" && exit 0 || exit $?
	;;
	*)
  log_success_msg "Usage: $0 {start|stop|restart|force-reload}"
	exit 2
	;;
esac
exit 0