Skip to content

Commit c5f002c

Browse files
committed
Add smtp-delay: Introduce SMTP banner delays for qmail
This little number can be used to introduce smtp banner delays for qmail. When run between tcpserver and rblsmtpd, it'll do a reverse lookup of the connecting IP, compare that PTR to a regex, and then apply long banner delays if there was no PTR or if the PTR matches the "dialup" regex. The program depends on the fact that tcpserver will set TCPREMOTEIP, and will take advantage of TCPREMOTEHOST if it's set. If the client tries to pipeline (ram SMTP commands down our throat before we show them an SMTP banner), RBLSMTPD is set, notifying rblsmtpd to refuse their mail.
1 parent e648c15 commit c5f002c

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

mail/smtp-delay/DESCR

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This little number can be used to introduce smtp banner delays for
2+
qmail. When run between tcpserver and rblsmtpd, it'll do a reverse
3+
lookup of the connecting IP, compare that PTR to a regex, and then apply
4+
long banner delays if there was no PTR or if the PTR matches the
5+
"dialup" regex. The program depends on the fact that tcpserver will set
6+
TCPREMOTEIP, and will take advantage of TCPREMOTEHOST if it's set. If
7+
the client tries to pipeline (ram SMTP commands down our throat before
8+
we show them an SMTP banner), RBLSMTPD is set, notifying rblsmtpd to
9+
refuse their mail.

mail/smtp-delay/Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# $NetBSD: Makefile,v 1.1 2023/12/05 17:36:16 schmonz Exp $
2+
3+
DISTNAME= smtp-delay
4+
PKGNAME= ${DISTNAME}-0.20
5+
CATEGORIES= mail
6+
MASTER_SITES= https://www.lewis.org/~jlewis/
7+
DIST_SUBDIR= ${PKGNAME_NOREV}
8+
EXTRACT_SUFX= .c
9+
10+
MAINTAINER= schmonz@NetBSD.org
11+
HOMEPAGE= https://www.lewis.org/~jlewis/smtp-delay/
12+
COMMENT= Introduce SMTP banner delays for qmail
13+
LICENSE= gnu-gpl-v2
14+
15+
WRKSRC= ${WRKDIR}
16+
17+
INSTALLATION_DIRS= bin
18+
19+
do-build:
20+
cd ${WRKSRC}; \
21+
${CC} ${CFLAGS} ${LDFLAGS} -o ${PKGBASE} ${PKGBASE}.c
22+
23+
do-install:
24+
${INSTALL_PROGRAM} ${WRKSRC}/${PKGBASE} ${DESTDIR}${PREFIX}/bin/
25+
26+
.include "../../mk/bsd.pkg.mk"

mail/smtp-delay/PLIST

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@comment $NetBSD: PLIST,v 1.1 2023/12/05 17:36:16 schmonz Exp $
2+
bin/smtp-delay

mail/smtp-delay/distinfo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$NetBSD: distinfo,v 1.1 2023/12/05 17:36:16 schmonz Exp $
2+
3+
BLAKE2s (smtp-delay-0.20/smtp-delay.c) = 7e72d14cc3715e18caece85b2c47451e892a7547932ba8360f7d6e2fe991eaee
4+
SHA512 (smtp-delay-0.20/smtp-delay.c) = f8b9b0043f9eba7d68f693349a4c2f9c9bda9607cef1d6f24b7d0230410b0f499ad16922c9e81421271c234a6db3d5a4ff263a87c83b9e4a984e92f49aa5185d
5+
Size (smtp-delay-0.20/smtp-delay.c) = 14569 bytes

0 commit comments

Comments
 (0)