aboutsummaryrefslogtreecommitdiff
path: root/mail/qmail/files
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2007-12-26 16:43:55 +0000
committerRenato Botelho <garga@FreeBSD.org>2007-12-26 16:43:55 +0000
commite1ab2d0519baa121de1ac526f83fa749d54be474 (patch)
tree77672134959ce64ff207c6c0d3f444e70ec007a7 /mail/qmail/files
parent3b1eaf2b19f347b4382bfabd40d2aa3c416ca747 (diff)
downloadports-e1ab2d0519baa121de1ac526f83fa749d54be474.tar.gz
ports-e1ab2d0519baa121de1ac526f83fa749d54be474.zip
Notes
Diffstat (limited to 'mail/qmail/files')
-rw-r--r--mail/qmail/files/extra-patch-amd6420
-rw-r--r--mail/qmail/files/qmail-smtpd.rcNG52
2 files changed, 72 insertions, 0 deletions
diff --git a/mail/qmail/files/extra-patch-amd64 b/mail/qmail/files/extra-patch-amd64
new file mode 100644
index 000000000000..68fa4ea6a32f
--- /dev/null
+++ b/mail/qmail/files/extra-patch-amd64
@@ -0,0 +1,20 @@
+--- alloc.c.orig 2007-12-26 14:24:10.000000000 -0200
++++ alloc.c 2007-12-26 14:25:40.000000000 -0200
+@@ -1,7 +1,6 @@
++#include <stdlib.h>
+ #include "alloc.h"
+ #include "error.h"
+-extern char *malloc();
+-extern void free();
+
+ #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
+ #define SPACE 4096 /* must be multiple of ALIGNMENT */
+--- spawn.c.orig 2007-12-26 14:24:53.000000000 -0200
++++ spawn.c 2007-12-26 14:25:09.000000000 -0200
+@@ -1,5 +1,6 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include "alloc.h"
+ #include "sig.h"
+ #include "wait.h"
+ #include "substdio.h"
diff --git a/mail/qmail/files/qmail-smtpd.rcNG b/mail/qmail/files/qmail-smtpd.rcNG
new file mode 100644
index 000000000000..56c17163e019
--- /dev/null
+++ b/mail/qmail/files/qmail-smtpd.rcNG
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# 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"