Skip to content
Permalink
Browse files

Initial import of qconfirm, an implementation of a delivery confirmation

process for a mailing list or mail address. It is invoked by qmail-local
through a dot-qmail file, and can reduce the amount of junk mail hitting
a mailbox or the mailboxes of mailing list subscribers. qconfirm
performs this delivery confirmation process either sender based or
message based.

When used for a public mail address, not a mailing list, qconfirm is
capable of detecting follow-ups on mail messages originated from this
mail address, and doesn't request delivery confirmation is this case.
qconfirm also is able to identify delivery confirmation requests from
recipients of mail messages, and automatically confirms the delivery
if desired.
  • Loading branch information...
schmonz committed Jul 9, 2019
1 parent b43e2ba commit 9381867c6a0226b0d08b5a200d4af6d8986ee5f0
@@ -0,0 +1,12 @@
qconfirm is an implementation of a delivery confirmation process for a
mailing list or mail address. It is invoked by qmail-local through a
dot-qmail file, and can reduce the amount of junk mail hitting a mailbox
or the mailboxes of mailing list subscribers. qconfirm performs this
delivery confirmation process either sender based or message based.

When used for a public mail address, not a mailing list, qconfirm is
capable of detecting follow-ups on mail messages originated from this
mail address, and doesn't request delivery confirmation is this case.
qconfirm also is able to identify delivery confirmation requests from
recipients of mail messages, and automatically confirms the delivery
if desired.
@@ -0,0 +1,33 @@
# $NetBSD: Makefile,v 1.1 2019/07/09 18:23:15 schmonz Exp $

DISTNAME= qconfirm-0.14.3
CATEGORIES= mail
MASTER_SITES= ${HOMEPAGE}

MAINTAINER= schmonz@NetBSD.org
HOMEPAGE= http://smarden.org/qconfirm/
COMMENT= Request delivery confirmation for mail
LICENSE= modified-bsd

DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools
DEPENDS+= qmail-[0-9]*:../../mail/qmail

DJB_SLASHPACKAGE= yes
DJB_RESTRICTED= no

WRKSRC= ${WRKDIR}/mail/${DISTNAME}

INSTALLATION_DIRS= bin ${PKGMANDIR}/man1

post-extract:
cd ${WRKSRC}/src \
&& ${MV} getline.h qconfirm_getline.h \
&& ${MV} getline.c qconfirm_getline.c

do-install:
cd ${WRKSRC} \
&& ${INSTALL_PROGRAM} command/* ${DESTDIR}${PREFIX}/bin \
&& ${INSTALL_MAN} man/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1

.include "../../mk/djbware.mk"
.include "../../mk/bsd.pkg.mk"
@@ -0,0 +1,23 @@
@comment $NetBSD: PLIST,v 1.1 2019/07/09 18:23:15 schmonz Exp $
bin/qconfirm
bin/qconfirm-accept
bin/qconfirm-cdb-check
bin/qconfirm-cdb-update
bin/qconfirm-check
bin/qconfirm-check-mid
bin/qconfirm-conf
bin/qconfirm-control
bin/qconfirm-inject
bin/qconfirm-notice
bin/qconfirm-return
man/man1/qconfirm-accept.1
man/man1/qconfirm-cdb-check.1
man/man1/qconfirm-cdb-update.1
man/man1/qconfirm-check-mid.1
man/man1/qconfirm-check.1
man/man1/qconfirm-conf.1
man/man1/qconfirm-control.1
man/man1/qconfirm-inject.1
man/man1/qconfirm-notice.1
man/man1/qconfirm-return.1
man/man1/qconfirm.1
@@ -0,0 +1,15 @@
$NetBSD: distinfo,v 1.1 2019/07/09 18:23:15 schmonz Exp $

SHA1 (qconfirm-0.14.3.tar.gz) = c19f1335aa71f8423551a12e4efa9ac151adedd9
RMD160 (qconfirm-0.14.3.tar.gz) = 221172ab6ee7586d642299a85712850dda14ddfc
SHA512 (qconfirm-0.14.3.tar.gz) = a4b018927ac58244e7780e9e741947202d7ed14a56e3593844eeb682e7695a69cd7310171ea9f9a15bd693b8145ce7736b7d800e6eecfae981a848cf22707016
Size (qconfirm-0.14.3.tar.gz) = 99317 bytes
SHA1 (patch-src_Makefile) = e09d7365d9139fa0d033ec42feca59f40e0a65b4
SHA1 (patch-src_TARGETS) = 29333aee6b7b55fcd73ce29f62dce204b72b3fb9
SHA1 (patch-src_qconfirm-check-mid.c) = 3ef0a8476ce042e8a028c1d591893ceb7284d0d2
SHA1 (patch-src_qconfirm-check.c) = 4f913d84fd3b17e005d0cb132347ac1959d9250c
SHA1 (patch-src_qconfirm-control.c) = 4ef3f8a023adae7f57b188862367c3bab3d80541
SHA1 (patch-src_qconfirm-notice.c) = c891373851a088fc4ca471e86a35960f254712ab
SHA1 (patch-src_qconfirm-return.c) = e4e13d094aa2b3ecd36555f989979c4d6d0b068b
SHA1 (patch-src_qconfirm__getline.c) = 7f3d4162aa4c7bc368bf4dd79a2c74b838acee07
SHA1 (patch-src_qconfirm__getline.h) = 3f2a201f21d3fe4e8821bd2c03639366869e671c
@@ -0,0 +1,74 @@
$NetBSD: patch-src_Makefile,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/Makefile.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/Makefile
@@ -17,9 +17,9 @@ qconfirm-accept: load qconfirm-accept.o

qconfirm-check: load qconfirm-check.o qconfirm_key.o sha1.o \
qconfirm_conf_get.o qconfirm_inject.o qconfirm_address2id.o \
- getline.o unix.a byte.a time.a
+ qconfirm_getline.o unix.a byte.a time.a
./load qconfirm-check qconfirm_key.o sha1.o qconfirm_conf_get.o \
- qconfirm_inject.o qconfirm_address2id.o getline.o unix.a byte.a \
+ qconfirm_inject.o qconfirm_address2id.o qconfirm_getline.o unix.a byte.a \
time.a

qconfirm-conf: load qconfirm-conf.o qconfirm_key.o sha1.o unix.a byte.a \
@@ -27,16 +27,16 @@ qconfirm-conf: load qconfirm-conf.o qcon
./load qconfirm-conf qconfirm_key.o sha1.o unix.a byte.a time.a

qconfirm-control: load qconfirm-control.o qconfirm_inject.o qconfirm_key.o \
- qconfirm_conf_get.o next_paragraph.o getline.o sha1.o unix.a \
+ qconfirm_conf_get.o next_paragraph.o qconfirm_getline.o sha1.o unix.a \
byte.a time.a
./load qconfirm-control qconfirm_inject.o qconfirm_key.o \
- qconfirm_conf_get.o sha1.o next_paragraph.o getline.o unix.a \
+ qconfirm_conf_get.o sha1.o next_paragraph.o qconfirm_getline.o unix.a \
byte.a time.a

qconfirm-return: load qconfirm-return.o qconfirm_address2id.o \
- next_paragraph.o getline.o unix.a byte.a
+ next_paragraph.o qconfirm_getline.o unix.a byte.a
./load qconfirm-return qconfirm_address2id.o next_paragraph.o \
- getline.o unix.a byte.a
+ qconfirm_getline.o unix.a byte.a

qconfirm-cdb-check: load qconfirm-cdb-check.o qconfirm_address2id.o \
qconfirm_conf_get.o cdb.a unix.a byte.a time.a
@@ -48,9 +48,9 @@ qconfirm-cdb-update: load qconfirm-cdb-u
./load qconfirm-cdb-update qconfirm_conf_get.o cdb.a unix.a byte.a \
time.a

-qconfirm-check-mid: load qconfirm-check-mid.o getline.o \
+qconfirm-check-mid: load qconfirm-check-mid.o qconfirm_getline.o \
qconfirm_address2id.o qconfirm_conf_get.o unix.a byte.a
- ./load qconfirm-check-mid getline.o qconfirm_address2id.o \
+ ./load qconfirm-check-mid qconfirm_getline.o qconfirm_address2id.o \
qconfirm_conf_get.o unix.a byte.a

qconfirm-inject: load qconfirm-inject.o qconfirm_conf_get.o qconfirm_key.o \
@@ -59,9 +59,9 @@ qconfirm-inject: load qconfirm-inject.o
unix.a byte.a time.a

qconfirm-notice: load qconfirm-notice.o qconfirm_conf_get.o qconfirm_key.o \
- sha1.o qconfirm_inject.o getline.o unix.a byte.a time.a
+ sha1.o qconfirm_inject.o qconfirm_getline.o unix.a byte.a time.a
./load qconfirm-notice qconfirm_conf_get.o qconfirm_key.o sha1.o \
- qconfirm_inject.o getline.o unix.a byte.a time.a
+ qconfirm_inject.o qconfirm_getline.o unix.a byte.a time.a

check-qconfirm-cdb: load check-qconfirm-cdb.o uint32_unpack.o unix.a byte.a
./load check-qconfirm-cdb uint32_unpack.o unix.a byte.a
@@ -121,8 +121,8 @@ qconfirm-check-mid.o: compile qconfirm-c
qconfirm_conf_get.o: compile qconfirm_conf_get.c
./compile qconfirm_conf_get.c

-getline.o: compile getline.c getline.h
- ./compile getline.c
+qconfirm_getline.o: compile qconfirm_getline.c qconfirm_getline.h
+ ./compile qconfirm_getline.c

next_paragraph.o: compile next_paragraph.c next_paragraph.h
./compile next_paragraph.c
@@ -0,0 +1,15 @@
$NetBSD: patch-src_TARGETS,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/TARGETS.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/TARGETS
@@ -39,7 +39,7 @@ qconfirm-inject.local
qconfirm-notice.local
qconfirm-return.local
qconfirm.local
-getline.o
+qconfirm_getline.o
next_paragraph.o
sha1.o
sysdeps
@@ -0,0 +1,20 @@
$NetBSD: patch-src_qconfirm-check-mid.c,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm-check-mid.c.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm-check-mid.c
@@ -16,5 +16,5 @@
#include "str.h"
#include "open.h"
-#include "getline.h"
+#include "qconfirm_getline.h"

#define USAGE " [-va] [ mid ... ]"
@@ -143,5 +143,5 @@ int main(int argc, char **argv) {
}

- while ((i =getline(buffer_0, &line)) > 0) {
+ while ((i =qconfirm_getline(buffer_0, &line)) > 0) {
if ((i == 1) && (line.s[0] == '\n')) break; /* end of headers */
/* lowercase line */
@@ -0,0 +1,24 @@
$NetBSD: patch-src_qconfirm-check.c,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm-check.c.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm-check.c
@@ -24,7 +24,7 @@
#include "wait.h"
#include "sig.h"
#include "lock.h"
-#include "getline.h"
+#include "qconfirm_getline.h"
#include "seek.h"

#define USAGE " [-mnbD] [-d dir ] [-i bytes ] [-t sec ] [prog]"
@@ -650,7 +650,7 @@ int main(int argc, const char **argv) {

/* get mid */
mid =0;
- while ((i =getline(buffer_0, &sa)) > 0) {
+ while ((i =qconfirm_getline(buffer_0, &sa)) > 0) {
if ((i == 1) && (sa.s[0] == '\n')) break; /* end of headers */
for (i =0; i < sa.len; ++i)
if (sa.s[i] < 32 || sa.s[i] > 126)
@@ -0,0 +1,24 @@
$NetBSD: patch-src_qconfirm-control.c,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm-control.c.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm-control.c
@@ -9,7 +9,7 @@
#include "qconfirm_inject.h"
#include "qconfirm_key.h"
#include "next_paragraph.h"
-#include "getline.h"
+#include "qconfirm_getline.h"
#include "strerr.h"
#include "error.h"
#include "buffer.h"
@@ -262,7 +262,7 @@ int process() {
if (! stralloc_copys(&args, "")) die_nomem();

/* lines */
- while ((r =getline(buffer_0, &sa)) > 0) {
+ while ((r =qconfirm_getline(buffer_0, &sa)) > 0) {
if (sa.s[0] == '\n') continue;
if ((sa.len > 2) && str_start(sa.s, qcontrol_quote)) {
int i, j;
@@ -0,0 +1,24 @@
$NetBSD: patch-src_qconfirm-notice.c,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm-notice.c.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm-notice.c
@@ -17,7 +17,7 @@
#include "open.h"
#include "openreadclose.h"
#include "buffer.h"
-#include "getline.h"
+#include "qconfirm_getline.h"
#include "str.h"
#include "byte.h"
#include "scan.h"
@@ -386,7 +386,7 @@ int main(int argc, const char **argv) {
}

/* check for confirmation request message */
- while ((i =getline(buffer_0, &sa)) > 0) {
+ while ((i =qconfirm_getline(buffer_0, &sa)) > 0) {
if ((i == 1) && (sa.s[0] == '\n')) break; /* end of headers */
if (request && reply_to.s) break;
for (i =0; i < sa.len; ++i) {
@@ -0,0 +1,40 @@
$NetBSD: patch-src_qconfirm-return.c,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm-return.c.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm-return.c
@@ -17,5 +17,5 @@
#include "qconfirm_id.h"
#include "next_paragraph.h"
-#include "getline.h"
+#include "qconfirm_getline.h"

#define USAGE " [-n limit ] [dir]"
@@ -76,5 +76,5 @@ int main(int argc, const char **argv) {

/* 'Hi. This is the' */
- if ((r =getline(buffer_0, &sa)) == -1)
+ if ((r =qconfirm_getline(buffer_0, &sa)) == -1)
strerr_die2x(0, WARNING, "empty body.");
if ((sa.len < 15) || ! str_start(sa.s, "Hi. This is the")) die_noqsbmf();
@@ -82,5 +82,5 @@ int main(int argc, const char **argv) {

/* failure paragraph */
- if (getline(buffer_0, &sa) == -1) die_noqsbmf();
+ if (qconfirm_getline(buffer_0, &sa) == -1) die_noqsbmf();
/* create id */
if ((sa.len < 4) || (sa.s[0] != '<') ||
@@ -101,10 +101,10 @@ int main(int argc, const char **argv) {

/* break paragraph */
- if (getline(buffer_0, &sa) == -1) die_noqsbmf();
+ if (qconfirm_getline(buffer_0, &sa) == -1) die_noqsbmf();
if (! sa.len || (sa.s[0] != '-')) die_noqsbmf();
if (next_paragraph(buffer_0) == -1) die_noqsbmf();

/* original message */
- while ((r =getline(buffer_0, &sa)) > 0) {
+ while ((r =qconfirm_getline(buffer_0, &sa)) > 0) {
int at, dash;

@@ -0,0 +1,15 @@
$NetBSD: patch-src_qconfirm__getline.c,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm_getline.c.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm_getline.c
@@ -2,7 +2,7 @@
#include "stralloc.h"
#include "byte.h"

-int getline(buffer *b, stralloc *line) {
+int qconfirm_getline(buffer *b, stralloc *line) {
int r, i;
char *x;

@@ -0,0 +1,9 @@
$NetBSD: patch-src_qconfirm__getline.h,v 1.1 2019/07/09 18:23:15 schmonz Exp $

Rename local getline() to avoid duplicating a system-provided definition.

--- src/qconfirm_getline.h.orig 2004-12-12 16:57:17.000000000 +0000
+++ src/qconfirm_getline.h
@@ -1 +1 @@
-extern int getline();
+extern int qconfirm_getline();

0 comments on commit 9381867

Please sign in to comment.
You can’t perform that action at this time.