From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 23 11:40:03 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B2F616A469 for ; Tue, 23 Oct 2007 11:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 121AD13C4C6 for ; Tue, 23 Oct 2007 11:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9NBe2WK060539 for ; Tue, 23 Oct 2007 11:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9NBe2t2060538; Tue, 23 Oct 2007 11:40:02 GMT (envelope-from gnats) Resent-Date: Tue, 23 Oct 2007 11:40:02 GMT Resent-Message-Id: <200710231140.l9NBe2t2060538@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick@van-laarhoven.org, "Hibma ; Tue, 23 Oct 2007 11:35:46 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from smtp-4.orange.nl (smtp-4.orange.nl [193.252.22.249]) by mx1.freebsd.org (Postfix) with ESMTP id 0A50213C4BF for ; Tue, 23 Oct 2007 11:35:45 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from smtp-4.orange.nl (mwinf6303 [10.232.3.25]) by mwinf6310.orange.nl (SMTP Server) with ESMTP id CABED1C0071D for ; Tue, 23 Oct 2007 10:12:38 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf6303.orange.nl (SMTP Server) with ESMTP id 96223700008B for ; Tue, 23 Oct 2007 10:12:28 +0200 (CEST) Received: from uitsmijter.van-laarhoven.org (ap-zvhz-13f05.adsl.wanadoo.nl [81.69.93.5]) by mwinf6303.orange.nl (SMTP Server) with ESMTP id 747DE7000086 for ; Tue, 23 Oct 2007 10:12:28 +0200 (CEST) Received: (qmail 28390 invoked by uid 1001); 23 Oct 2007 08:12:27 -0000 Message-Id: <20071023081227.28389.qmail@uitsmijter.van-laarhoven.org> Date: 23 Oct 2007 08:12:27 -0000 From: Nick@van-laarhoven.org, "Hibma List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2007 11:40:03 -0000 >Number: 117422 >Category: ports >Synopsis: [PATCH] startup file for qmail-smtpd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 23 11:40:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: FreeBSD 6.2-STABLE i386 >Organization: AnyWi Technologies >Environment: System: FreeBSD uitsmijter.van-laarhoven.org 6.2-STABLE FreeBSD 6.2-STABLE #2: Sat Feb 10 22:04:29 CET 2007 root@uitsmijter.van-laarhoven.org:/usr/src/sys/i386/compile/UITSMIJTER i386 >Description: Please find below a complete startup script for qmail-smtpd. I've now written the thing several times, and it might as well be included in the distribution. >How-To-Repeat: Put it in /usr/local/etc/rc.d and add the appropriate flags in /etc/rc.conf or /etc/rc.conf.d/qmailsmtpd. >Fix: #!/bin/sh # # Copyright 2007, AnyWi Technologies # # PROVIDE: qmailsmtpd # REQUIRE: LOGIN cleanvar # # To use the checkpassword interface to qmail-smtpd, set # qmailsmtpd_checkpassword to the full path to the checkpassword program (e.g. # security/checkpassword or security checkpassword-pam). # # Note: tcpserver can be found in the sysutils/ucspi-tcp package. . /etc/rc.subr name="qmailsmtpd" rcvar=`set_rcvar` load_rc_config $name : ${qmailsmtpd_tcpserver="/usr/local/bin/tcpserver"} : ${qmailsmtpd_tcprules="/usr/local/bin/tcprules"} : ${qmailsmtpd_enable="NO"} : ${qmailsmtpd_cdb="/etc/tcp.smtp"} : ${qmailsmtpd_flags="-R -H -u 82 -g 81"} : ${qmailsmtpd_host="0"} : ${qmailsmtpd_port="smtp"} : ${qmailsmtpd_smtpd="/var/qmail/bin/qmail-smtpd"} : ${qmailsmtpd_fqdn=`hostname`} : ${qmailsmtpd_checkpassword=""} # e.g. /usr/local/bin/checkpassword-pam : ${qmailsmtpd_checksubprogram="/usr/bin/true"} qmailsmtpd_start() { $qmailsmtpd_tcprules $qmailsmtpd_cdb.cdb $qmailsmtpd_cdb.tmp < $qmailsmtpd_cdb \ || return 1 if [ "x$qmailsmtpd_checkpassword" != "x" ]; then qmailsmtpd_usercheck="$qmailsmtpd_fqdn $qmailsmtpd_checkpassword $qmailsmtpd_checksubprogram" fi echo "Starting qmail-smtpd." $qmailsmtpd_tcpserver -x $qmailsmtpd_cdb.cdb $qmailsmtpd_flags $qmailsmtpd_host $qmailsmtpd_port \ $qmailsmtpd_smtpd $qmailsmtpd_usercheck & echo $! > /var/run/qmailsmtpd.pid } qmailsmtpd_stop() { echo "Stopping qmail-smtpd" kill `cat /var/run/qmailsmtpd.pid` } start_cmd="qmailsmtpd_start" stop_cmd="qmailsmtpd_stop" run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: