summaryrefslogtreecommitdiff
path: root/mail/qmail/files/qmailpop3d.sh
blob: f0a8a54de6fafdd9335ef44cdb34c82f9e99a6ca (plain)
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
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: qmailpop3d.sh,v 1.1 2004/04/24 05:29:36 schmonz Exp $
#

# PROVIDE: mail
# REQUIRE: qmail

. /etc/rc.subr

name="qmailpop3d"
rcvar=${name}
required_files="@QMAILDIR@/control/me"
command="@LOCALBASE_NORMAL@/bin/tcpserver"
procname=${name}
start_precmd="qmailpop3d_precmd"

if [ -z "$qmailpop3d_flags" ]; then
	qmailpop3d_flags="-v -H -R -l 0"
fi

qmailpop3d_precmd()
{
	command="@SETENV@ - @LOCALBASE_NORMAL@/bin/argv0 @LOCALBASE_NORMAL@/bin/tcpserver $name $qmailpop3d_flags 0 110 @QMAILDIR@/bin/qmail-popup `@CAT@ @QMAILDIR@/control/me` @LOCALBASE_NORMAL@/bin/checkpassword @QMAILDIR@/bin/qmail-pop3d Maildir 2>&1 | @QMAILDIR@/bin/splogger pop3d 3"
	command_args="&"
	rc_flags=""
}

load_rc_config $name
run_rc_command "$1"