summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/qmail-run/DEINSTALL14
-rw-r--r--mail/qmail-run/DESCR7
-rw-r--r--mail/qmail-run/INSTALL31
-rw-r--r--mail/qmail-run/MESSAGE31
-rw-r--r--mail/qmail-run/Makefile44
-rw-r--r--mail/qmail-run/PLIST12
-rw-r--r--mail/qmail-run/files/concurrencyincoming1
-rw-r--r--mail/qmail-run/files/concurrencypop31
-rw-r--r--mail/qmail-run/files/concurrencysubmission1
-rw-r--r--mail/qmail-run/files/defaultdelivery1
-rw-r--r--mail/qmail-run/files/fixsmtpio39
-rw-r--r--mail/qmail-run/files/qmailofmipd.sh12
-rw-r--r--mail/qmail-run/files/qmailpop3d.sh5
-rw-r--r--mail/qmail-run/files/qmailsmtpd.sh4
-rw-r--r--mail/qmail-run/files/signatures18
-rw-r--r--mail/qmail-run/files/spamdyke-ofmipd.conf8
-rw-r--r--mail/qmail-run/files/tcp.ofmip2
-rw-r--r--mail/qmail-run/files/tcp.pop31
-rw-r--r--mail/qmail-run/files/tcp.smtp2
-rw-r--r--mail/qmail-run/options.mk14
20 files changed, 147 insertions, 101 deletions
diff --git a/mail/qmail-run/DEINSTALL b/mail/qmail-run/DEINSTALL
new file mode 100644
index 00000000000..a9e61b37418
--- /dev/null
+++ b/mail/qmail-run/DEINSTALL
@@ -0,0 +1,14 @@
+# $NetBSD: DEINSTALL,v 1.1 2018/10/24 15:46:54 schmonz Exp $
+
+PKG_SYSCONFDIR=@PKG_SYSCONFDIR@
+
+case "${STAGE}" in
+
+POST-DEINSTALL)
+ for i in ofmip pop3 smtp; do
+ s="${PKG_SYSCONFDIR}/tcp.${i}"
+ [ -f "${s}.cdb" ] && ! [ -f "${s}" ] && rm -f "${s}.cdb"
+ done
+ ;;
+
+esac
diff --git a/mail/qmail-run/DESCR b/mail/qmail-run/DESCR
index 01fdf4b1d89..a5abb619eb2 100644
--- a/mail/qmail-run/DESCR
+++ b/mail/qmail-run/DESCR
@@ -1,4 +1,3 @@
-This package creates all the needed basic config files to run
-qmail, provides example {mailer,spamdyke,stunnel}.conf and wrappers
-for procmail, spamassassin, and rspamd, and installs NetBSD-style
-rc.d scripts.
+This package creates all the needed basic config files to run qmail,
+provides example {mailer,stunnel}.conf and wrappers for procmail,
+spamassassin, and rspamd, and installs NetBSD-style rc.d scripts.
diff --git a/mail/qmail-run/INSTALL b/mail/qmail-run/INSTALL
index 4d7f8fe9b57..4cd2b09fe21 100644
--- a/mail/qmail-run/INSTALL
+++ b/mail/qmail-run/INSTALL
@@ -10,37 +10,7 @@ POST-INSTALL)
cd ${PKG_SYSCONFDIR}/alias && ${TOUCH} .qmail-postmaster .qmail-mailer-daemon .qmail-root
- if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencyofmip ]; then
- ${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencyofmip
- ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencyofmip
- ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencyofmip
- fi
-
- if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencypop3 ]; then
- ${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencypop3
- ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencypop3
- ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencypop3
- fi
-
- if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencyincoming ]; then
- ${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencyincoming
- ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencyincoming
- ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencyincoming
- fi
-
- if ! [ -s ${PKG_SYSCONFDIR}/control/defaultdelivery ]; then
- ${ECHO} ./Mailbox > ${PKG_SYSCONFDIR}/control/defaultdelivery
- ${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/defaultdelivery
- ${CHMOD} 644 ${PKG_SYSCONFDIR}/control/defaultdelivery
- fi
-
- pop3rule=':allow'
- smtprule='127.:allow,RELAYCLIENT=""'
for i in ofmip pop3 smtp; do
- if ! [ -s ${PKG_SYSCONFDIR}/tcp.${i} ]; then
- ${ECHO} "$psmsg" > ${PKG_SYSCONFDIR}/tcp.${i}
- eval ${ECHO} \"\$${i}rule\" > ${PKG_SYSCONFDIR}/tcp.${i}
- fi
${CHMOD} 644 ${PKG_SYSCONFDIR}/tcp.${i}
${PREFIX}/bin/tcprules ${PKG_SYSCONFDIR}/tcp.${i}.cdb ${PKG_SYSCONFDIR}/tcp.${i}.tmp < ${PKG_SYSCONFDIR}/tcp.${i}
${CHMOD} 644 ${PKG_SYSCONFDIR}/tcp.${i}.cdb
@@ -52,5 +22,4 @@ POST-INSTALL)
fi
;;
-
esac
diff --git a/mail/qmail-run/MESSAGE b/mail/qmail-run/MESSAGE
index 94d81e2a932..76b71b43e9b 100644
--- a/mail/qmail-run/MESSAGE
+++ b/mail/qmail-run/MESSAGE
@@ -1,41 +1,34 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.7 2017/07/21 04:08:15 schmonz Exp $
+$NetBSD: MESSAGE,v 1.8 2018/10/24 15:46:54 schmonz Exp $
Please read ${PREFIX}/share/doc/qmail-run/README.pkgsrc.
-To enable qmail for...
+Assuming NetBSD-style mailwrapper(8) and rc(8), to enable qmail for...
Local and outgoing deliveries:
-- Check the configuration files in ${PKG_SYSCONFDIR}
+- Check configuration in ${PKG_SYSCONFDIR}
- Replace /etc/mailer.conf with share/examples/qmail-run/mailer.conf
-- In /etc/rc.conf, set
- qmailsend=YES
+- Set qmailsend=YES in /etc/rc.conf
Local non-root users to see the queue:
- Change the mailq entry in /etc/mailer.conf to qmail-qread-client
-- In /etc/rc.conf, set
- qmailqread=YES
+- Set qmailqread=YES in /etc/rc.conf
Incoming SMTP deliveries:
-- In /etc/rc.conf, set
- qmailsmtpd=YES
- qmailsmtpd_postenv="QMAILQUEUE=${PREFIX}/bin/qmail-qfilter-smtpd-queue RCPTCHECK=${PREFIX}/bin/qmail-rcptcheck"
+- Set qmailsmtpd=YES in /etc/rc.conf
Filtering incoming SMTP:
- List qmail-qfilter programs in ${PKG_SYSCONFDIR}/control/smtpfilters
- List qmail-rcptcheck programs in ${PKG_SYSCONFDIR}/control/rcptchecks
Outgoing submissions with SMTP AUTH over TLS:
-- Incorporate share/examples/qmail-run/stunnel.conf into your stunnel.conf
-- Consider that your checkpassword binary may need to be setuid root
-- Copy share/examples/qmail-run/spamdyke-ofmipd.conf to ${PKG_SYSCONFBASE}
-- In /etc/rc.conf, set
- qmailofmipd=YES
- qmailofmipd_preofmipd="${PREFIX}/bin/spamdyke --config-file ${PKG_SYSCONFBASE}/spamdyke-ofmipd.conf"
- stunnel=YES
+- Incorporate share/examples/qmail-run/stunnel.conf into stunnel.conf
+- Set qmailofmipd=YES and stunnel=YES in /etc/rc.conf
+
+Filtering outgoing submissions:
+- List qmail-qfilter programs in ${PKG_SYSCONFDIR}/control/ofmipfilters
Fetching Maildirs via POP3:
-- In /etc/rc.conf, set
- qmailpop3d=YES
+- Set qmailpop3d=YES in /etc/rc.conf
===========================================================================
diff --git a/mail/qmail-run/Makefile b/mail/qmail-run/Makefile
index c2b890c1f4a..523405d4533 100644
--- a/mail/qmail-run/Makefile
+++ b/mail/qmail-run/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.48 2018/09/10 09:07:49 schmonz Exp $
+# $NetBSD: Makefile,v 1.49 2018/10/24 15:46:54 schmonz Exp $
#
-DISTNAME= qmail-run-20180910
+DISTNAME= qmail-run-20181024
CATEGORIES= mail
MASTER_SITES= # empty
DISTFILES= # empty
@@ -10,10 +10,10 @@ MAINTAINER= schmonz@NetBSD.org
COMMENT= Configures qmail to receive and deliver mail
LICENSE= 2-clause-bsd
-DEPENDS+= mess822-[0-9]*:../../mail/mess822
DEPENDS+= pkg_alternatives-[0-9]*:../../pkgtools/pkg_alternatives
DEPENDS_QMAIL= qmail>=1.03nb36:../../mail/qmail
DEPENDS+= ${DEPENDS_QMAIL}
+DEPENDS+= qmail-acceptutils-[0-9]*:../../mail/qmail-acceptutils
DEPENDS+= qmail-qfilter>1.5nb1:../../mail/qmail-qfilter
DEPENDS+= qmail-rejectutils-[0-9]*:../../mail/qmail-rejectutils
@@ -29,6 +29,16 @@ FILES_SUBST+= PKGNAME=${PKGNAME:Q}
MESSAGE_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE:Q}
RCD_SCRIPTS= qmail qmailofmipd qmailpop3d qmailqread qmailsend qmailsmtpd
+.for f in defaultdelivery fixsmtpio signatures \
+ concurrencyincoming concurrencypop3 concurrencysubmission
+CONF_FILES+= ${PREFIX}/share/examples/qmail-run/${f} \
+ ${PKG_SYSCONFDIR}/control/${f}
+.endfor
+.for f in tcp.ofmip tcp.pop3 tcp.smtp
+CONF_FILES+= ${PREFIX}/share/examples/qmail-run/${f} \
+ ${PKG_SYSCONFDIR}/${f}
+.endfor
+
INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run
BUILD_DEFS+= QMAIL_DAEMON_USER QMAIL_LOG_USER QMAIL_SEND_USER
BUILD_DEFS+= QMAIL_QUEUE_EXTRA PKG_SYSCONFBASE
@@ -50,33 +60,39 @@ MAKEVARS+= PKG_SYSCONFDIR.qmail-run
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths= mailer.conf qmail-isspam-* qmail-procmail
-SUBST_FILES.paths+= qmail-qread-client spamdyke-ofmipd.conf
+SUBST_FILES.paths= mailer.conf
+SUBST_FILES.paths+= qmail-isspam-* qmail-procmail qmail-qread-client
+SUBST_FILES.paths+= tcp.*
SUBST_VARS.paths= PKGNAME PKG_SYSCONFDIR PREFIX
SUBST_VARS.paths+= CAT ECHO GREP SED SH SORT TRUE
-.include "options.mk"
-
post-extract:
- for f in README.pkgsrc mailer.conf spamdyke-ofmipd.conf stunnel.conf; do \
- ${CP} ${FILESDIR}/$$f ${WRKDIR}/$$f; \
- done
+ for f in README.pkgsrc mailer.conf stunnel.conf \
+ defaultdelivery fixsmtpio signatures \
+ concurrencyincoming concurrencypop3 concurrencysubmission \
+ tcp.ofmip tcp.pop3 tcp.smtp; do \
+ ${CP} ${FILESDIR}/$$f ${WRKDIR}/$$f; \
+ done; \
for f in qmail-isspam-rspamd qmail-isspam-spamassassin \
qmail-procmail qmail-qread-client; do \
- ${CP} ${FILESDIR}/$$f.sh ${WRKDIR}/$$f; \
+ ${CP} ${FILESDIR}/$$f.sh ${WRKDIR}/$$f; \
done
do-install:
for f in qmail-isspam-rspamd qmail-isspam-spamassassin \
qmail-procmail qmail-qread-client; do \
- ${INSTALL_SCRIPT} ${WRKDIR}/$$f ${DESTDIR}${PREFIX}/bin; \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$$f ${DESTDIR}${PREFIX}/bin; \
done
${INSTALL_DATA} ${WRKDIR}/README.pkgsrc \
${DESTDIR}${PREFIX}/share/doc/qmail-run
+ for f in defaultdelivery fixsmtpio signatures \
+ concurrencyincoming concurrencypop3 concurrencysubmission \
+ tcp.ofmip tcp.pop3 tcp.smtp; do \
+ ${INSTALL_DATA} ${WRKDIR}/$${f} \
+ ${DESTDIR}${PREFIX}/share/examples/qmail-run; \
+ done; \
${INSTALL_DATA} ${WRKDIR}/mailer.conf \
${DESTDIR}${PREFIX}/share/examples/qmail-run
- ${INSTALL_DATA} ${WRKDIR}/spamdyke-ofmipd.conf \
- ${DESTDIR}${PREFIX}/share/examples/qmail-run
${INSTALL_DATA} ${WRKDIR}/stunnel.conf \
${DESTDIR}${PREFIX}/share/examples/qmail-run
diff --git a/mail/qmail-run/PLIST b/mail/qmail-run/PLIST
index d30d4c22244..909acd3821e 100644
--- a/mail/qmail-run/PLIST
+++ b/mail/qmail-run/PLIST
@@ -1,9 +1,17 @@
-@comment $NetBSD: PLIST,v 1.11 2018/09/10 09:07:49 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.12 2018/10/24 15:46:54 schmonz Exp $
bin/qmail-isspam-rspamd
bin/qmail-isspam-spamassassin
bin/qmail-procmail
bin/qmail-qread-client
share/doc/qmail-run/README.pkgsrc
+share/examples/qmail-run/concurrencyincoming
+share/examples/qmail-run/concurrencypop3
+share/examples/qmail-run/concurrencysubmission
+share/examples/qmail-run/defaultdelivery
+share/examples/qmail-run/fixsmtpio
share/examples/qmail-run/mailer.conf
-share/examples/qmail-run/spamdyke-ofmipd.conf
+share/examples/qmail-run/signatures
share/examples/qmail-run/stunnel.conf
+share/examples/qmail-run/tcp.ofmip
+share/examples/qmail-run/tcp.pop3
+share/examples/qmail-run/tcp.smtp
diff --git a/mail/qmail-run/files/concurrencyincoming b/mail/qmail-run/files/concurrencyincoming
new file mode 100644
index 00000000000..209e3ef4b62
--- /dev/null
+++ b/mail/qmail-run/files/concurrencyincoming
@@ -0,0 +1 @@
+20
diff --git a/mail/qmail-run/files/concurrencypop3 b/mail/qmail-run/files/concurrencypop3
new file mode 100644
index 00000000000..209e3ef4b62
--- /dev/null
+++ b/mail/qmail-run/files/concurrencypop3
@@ -0,0 +1 @@
+20
diff --git a/mail/qmail-run/files/concurrencysubmission b/mail/qmail-run/files/concurrencysubmission
new file mode 100644
index 00000000000..209e3ef4b62
--- /dev/null
+++ b/mail/qmail-run/files/concurrencysubmission
@@ -0,0 +1 @@
+20
diff --git a/mail/qmail-run/files/defaultdelivery b/mail/qmail-run/files/defaultdelivery
new file mode 100644
index 00000000000..5427e330e6c
--- /dev/null
+++ b/mail/qmail-run/files/defaultdelivery
@@ -0,0 +1 @@
+./Mailbox
diff --git a/mail/qmail-run/files/fixsmtpio b/mail/qmail-run/files/fixsmtpio
new file mode 100644
index 00000000000..53e8e66ce71
--- /dev/null
+++ b/mail/qmail-run/files/fixsmtpio
@@ -0,0 +1,39 @@
+### For all users, authenticated or not:
+
+# Prepend acceptutils link to HELP message, so problems go to fixsmtpio author
+:help::*::&fixsmtpio_fixup
+
+# Replace hostname in initial greeting
+:greeting::2*::&fixsmtpio_fixup
+
+# Replace hostname in HELO/EHLO response
+:helo::2*::&fixsmtpio_fixup
+:ehlo::2*::&fixsmtpio_fixup
+
+# Replace hostname in QUIT response
+:quit::2*::&fixsmtpio_fixup
+
+########################################################################
+
+### For users authenticated via authup(8):
+
+# SMTP conversation already in progress, replace greeting
+AUTHUP_USER:greeting::2*::235 ok, go ahead (#2.0.0)
+
+# If client closes connection, tell authup the session succeeded
+AUTHUP_USER:clienteof::*:0:
+
+# If server greets us unhappily, preserve message, and tell authup to stop trying
+AUTHUP_USER:greeting::4*:14:&fixsmtpio_noop
+AUTHUP_USER:greeting::5*:15:&fixsmtpio_noop
+
+# If server times out, hide message, and tell authup to stop trying
+AUTHUP_USER:timeout::*:16:
+
+# Don't permit server to advertise further AUTH or STARTTLS
+AUTHUP_USER:ehlo::250?AUTH*::
+AUTHUP_USER:ehlo::250?STARTTLS::
+
+# Don't permit client to initiate further AUTH or STARTTLS
+AUTHUP_USER:auth:NOOP :*::502 unimplemented (#5.5.1)
+AUTHUP_USER:starttls:NOOP :*::502 unimplemented (#5.5.1)
diff --git a/mail/qmail-run/files/qmailofmipd.sh b/mail/qmail-run/files/qmailofmipd.sh
index 81f3a9df007..9c972703db7 100644
--- a/mail/qmail-run/files/qmailofmipd.sh
+++ b/mail/qmail-run/files/qmailofmipd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailofmipd.sh,v 1.9 2017/08/05 15:21:03 schmonz Exp $
+# $NetBSD: qmailofmipd.sh,v 1.10 2018/10/24 15:46:54 schmonz Exp $
#
# @PKGNAME@ script to control ofmipd (SMTP submission service).
#
@@ -11,7 +11,7 @@
name="qmailofmipd"
# User-settable rc.conf variables and their default values:
-: ${qmailofmipd_postenv:="QMAILQUEUE=@PREFIX@/bin/qmail-queue"}
+: ${qmailofmipd_postenv:=""}
: ${qmailofmipd_tcpflags:="-vRl0"}
: ${qmailofmipd_tcphost:="127.0.0.1"}
: ${qmailofmipd_tcpport:="26"}
@@ -20,6 +20,7 @@ name="qmailofmipd"
: ${qmailofmipd_tcpserver:="@PREFIX@/bin/tcpserver"}
: ${qmailofmipd_preofmipd:=""}
: ${qmailofmipd_ofmipdcmd:="@PREFIX@/bin/ofmipd"}
+: ${qmailofmipd_checkpassword:="@PREFIX@/bin/nbcheckpassword"}
: ${qmailofmipd_postofmipd:=""}
: ${qmailofmipd_log:="YES"}
: ${qmailofmipd_logcmd:="logger -t nb${name} -p mail.info"}
@@ -30,7 +31,7 @@ if [ -f /etc/rc.subr ]; then
fi
rcvar=${name}
-required_files="@PKG_SYSCONFDIR@/control/concurrencyofmip"
+required_files="@PKG_SYSCONFDIR@/control/concurrencysubmission"
required_files="${required_files} @PKG_SYSCONFDIR@/tcp.ofmip.cdb"
required_files="${required_files} @PKG_SYSCONFDIR@/control/rcpthosts"
command="${qmailofmipd_tcpserver}"
@@ -55,9 +56,10 @@ qmailofmipd_precmd()
@PREFIX@/bin/softlimit -m ${qmailofmipd_datalimit} ${qmailofmipd_pretcpserver}
@PREFIX@/bin/argv0 ${qmailofmipd_tcpserver} ${procname}
${qmailofmipd_tcpflags} -x @PKG_SYSCONFDIR@/tcp.ofmip.cdb
--c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencyofmip`
--u `@ID@ -u @QMAIL_DAEMON_USER@` -g `@ID@ -g @QMAIL_DAEMON_USER@`
+-c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencysubmission`
${qmailofmipd_tcphost} ${qmailofmipd_tcpport}
+@PREFIX@/bin/reup -t 5 @PREFIX@/bin/authup smtp
+${qmailofmipd_checkpassword} @PREFIX@/bin/checknotroot @PREFIX@/bin/fixsmtpio
${qmailofmipd_preofmipd} ${qmailofmipd_ofmipdcmd} ${qmailofmipd_postofmipd}
2>&1 |
@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailofmipd_logcmd}"
diff --git a/mail/qmail-run/files/qmailpop3d.sh b/mail/qmail-run/files/qmailpop3d.sh
index 27f151efdf3..a4f6e653a8b 100644
--- a/mail/qmail-run/files/qmailpop3d.sh
+++ b/mail/qmail-run/files/qmailpop3d.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailpop3d.sh,v 1.19 2018/08/01 07:15:21 schmonz Exp $
+# $NetBSD: qmailpop3d.sh,v 1.20 2018/10/24 15:46:54 schmonz Exp $
#
# @PKGNAME@ script to control qmail-pop3d (POP3 server for Maildirs).
#
@@ -57,7 +57,8 @@ qmailpop3d_precmd()
${qmailpop3d_tcpflags} -x @PKG_SYSCONFDIR@/tcp.pop3.cdb
-c `@HEAD@ -1 @PKG_SYSCONFDIR@/control/concurrencypop3`
${qmailpop3d_tcphost} ${qmailpop3d_tcpport} @PREFIX@/bin/qmail-popup
-`@HEAD@ -1 @PKG_SYSCONFDIR@/control/me` ${qmailpop3d_checkpassword}
+`@HEAD@ -1 @PKG_SYSCONFDIR@/control/me`
+${qmailpop3d_checkpassword} @PREFIX@/bin/checknotroot
${qmailpop3d_prepop3d} ${qmailpop3d_pop3dcmd} ${qmailpop3d_maildirname}
2>&1 |
@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @QMAIL_LOG_USER@ ${qmailpop3d_logcmd}"
diff --git a/mail/qmail-run/files/qmailsmtpd.sh b/mail/qmail-run/files/qmailsmtpd.sh
index 2ca4bb54952..5429b06b27a 100644
--- a/mail/qmail-run/files/qmailsmtpd.sh
+++ b/mail/qmail-run/files/qmailsmtpd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: qmailsmtpd.sh,v 1.17 2017/08/05 15:21:03 schmonz Exp $
+# $NetBSD: qmailsmtpd.sh,v 1.18 2018/10/24 15:46:54 schmonz Exp $
#
# @PKGNAME@ script to control qmail-smtpd (SMTP service).
#
@@ -11,7 +11,7 @@
name="qmailsmtpd"
# User-settable rc.conf variables and their default values:
-: ${qmailsmtpd_postenv:="QMAILQUEUE=@PREFIX@/bin/qmail-queue"}
+: ${qmailsmtpd_postenv:=""}
: ${qmailsmtpd_tcpflags:="-vRl0"}
: ${qmailsmtpd_tcphost:="0"}
: ${qmailsmtpd_tcpport:="25"}
diff --git a/mail/qmail-run/files/signatures b/mail/qmail-run/files/signatures
new file mode 100644
index 00000000000..70e72a68d80
--- /dev/null
+++ b/mail/qmail-run/files/signatures
@@ -0,0 +1,18 @@
+# Windows executables seen in active virii
+TVqQAAMAA
+TVpQAAIAA
+# Additional windows executable signatures not yet seen in virii
+TVpAALQAc
+TVpyAXkAX
+TVrmAU4AA
+TVrhARwAk
+TVoFAQUAA
+TVoAAAQAA
+TVoIARMAA
+TVouARsAA
+TVrQAT8AA
+# .ZIPfile signature seen in SoBig.E and mydoom:
+UEsDBBQAA
+UEsDBAoAAA
+# .GIF file found in a previous Microsoft virus making the rounds.
+R0lGODlhaAA7APcAAP///+rp6puSp6GZrDUjUUc6Zn53mFJMdbGvvVtXh2xre8bF1x8cU4yLprOy
diff --git a/mail/qmail-run/files/spamdyke-ofmipd.conf b/mail/qmail-run/files/spamdyke-ofmipd.conf
deleted file mode 100644
index f157c0c8578..00000000000
--- a/mail/qmail-run/files/spamdyke-ofmipd.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# $NetBSD: spamdyke-ofmipd.conf,v 1.3 2018/08/01 07:15:21 schmonz Exp $
-#
-# Wrap qmail-ofmipd with SMTP AUTH.
-#
-hostname-file=@PKG_SYSCONFDIR@/control/me
-qmail-rcpthosts-file=@PKG_SYSCONFDIR@/control/rcpthosts
-smtp-auth-level=always
-smtp-auth-command="@PREFIX@/bin/nbcheckpassword @TRUE@"
diff --git a/mail/qmail-run/files/tcp.ofmip b/mail/qmail-run/files/tcp.ofmip
new file mode 100644
index 00000000000..1c1ef68f38f
--- /dev/null
+++ b/mail/qmail-run/files/tcp.ofmip
@@ -0,0 +1,2 @@
+127.:allow,RELAYCLIENT=""
+:allow,QMAILQUEUE="@PREFIX@/bin/qmail-qfilter-ofmipd-queue"
diff --git a/mail/qmail-run/files/tcp.pop3 b/mail/qmail-run/files/tcp.pop3
new file mode 100644
index 00000000000..8fb0496f637
--- /dev/null
+++ b/mail/qmail-run/files/tcp.pop3
@@ -0,0 +1 @@
+:allow
diff --git a/mail/qmail-run/files/tcp.smtp b/mail/qmail-run/files/tcp.smtp
new file mode 100644
index 00000000000..796993c6112
--- /dev/null
+++ b/mail/qmail-run/files/tcp.smtp
@@ -0,0 +1,2 @@
+127.:allow,RELAYCLIENT=""
+:allow,QMAILQUEUE="@PREFIX@/bin/qmail-qfilter-smtpd-queue",RCPTCHECK="@PREFIX@/bin/qmail-rcptcheck"
diff --git a/mail/qmail-run/options.mk b/mail/qmail-run/options.mk
deleted file mode 100644
index b6941d84251..00000000000
--- a/mail/qmail-run/options.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# $NetBSD: options.mk,v 1.3 2017/06/17 05:58:39 schmonz Exp $
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.qmail-run
-PKG_SUPPORTED_OPTIONS+= sasl tls
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Msasl)
-DEPENDS+= spamdyke-[0-9]*:../../mail/spamdyke
-.endif
-
-.if !empty(PKG_OPTIONS:Mtls)
-DEPENDS+= stunnel-[0-9]*:../../security/stunnel
-.endif