summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2017-09-28 17:27:34 +0000
committerschmonz <schmonz@pkgsrc.org>2017-09-28 17:27:34 +0000
commit57323e0f9b88a02306ad36126c3c1737ff635779 (patch)
treebd5f3aa358c77580d2e39b8fb6622558a69bac87 /mail
parent9037c75954daa812a0adb8e1fa476a42bfa71db9 (diff)
downloadpkgsrc-57323e0f9b88a02306ad36126c3c1737ff635779.tar.gz
Add qmail-autoresponder, a rate-limited autoresponder for qmail.
Features: - Limits rate of automatic responses (defaults to a maximum of one message every hour). - Will not respond to nearly every type of mailing list or bulk email. - Will not respond to bounce messages or MAILER-DAEMON. - Bounces looping messages. - Can insert the original subject into the response. - Can copy original message into response. - Can use links in the rate-limiting data directory to limit inode usage to a single inode. - Can limit responses to a certain date/time range.
Diffstat (limited to 'mail')
-rw-r--r--mail/qmail-autoresponder/DESCR12
-rw-r--r--mail/qmail-autoresponder/Makefile26
-rw-r--r--mail/qmail-autoresponder/PLIST5
-rw-r--r--mail/qmail-autoresponder/distinfo8
-rw-r--r--mail/qmail-autoresponder/options.mk13
-rw-r--r--mail/qmail-autoresponder/patches/patch-Makefile37
-rw-r--r--mail/qmail-autoresponder/patches/patch-options.c12
7 files changed, 113 insertions, 0 deletions
diff --git a/mail/qmail-autoresponder/DESCR b/mail/qmail-autoresponder/DESCR
new file mode 100644
index 00000000000..e8b1677172f
--- /dev/null
+++ b/mail/qmail-autoresponder/DESCR
@@ -0,0 +1,12 @@
+This is a simple program to automatically respond to emails. Features:
+
+- Limits rate of automatic responses (defaults to a maximum of one
+ message every hour).
+- Will not respond to nearly every type of mailing list or bulk email.
+- Will not respond to bounce messages or MAILER-DAEMON.
+- Bounces looping messages.
+- Can insert the original subject into the response.
+- Can copy original message into response.
+- Can use links in the rate-limiting data directory to limit inode usage
+ to a single inode.
+- Can limit responses to a certain date/time range.
diff --git a/mail/qmail-autoresponder/Makefile b/mail/qmail-autoresponder/Makefile
new file mode 100644
index 00000000000..d5c8354fa00
--- /dev/null
+++ b/mail/qmail-autoresponder/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2017/09/28 17:27:34 schmonz Exp $
+
+DISTNAME= qmail-autoresponder-1.0
+CATEGORIES= mail
+MASTER_SITES= ${HOMEPAGE}
+
+MAINTAINER= schmonz@NetBSD.org
+HOMEPAGE= http://untroubled.org/qmail-autoresponder/
+COMMENT= Rate-limited autoresponder for qmail
+LICENSE= gnu-gpl-v2
+
+DEPENDS+= qmail-[0-9]*:../../mail/qmail
+
+INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
+INSTALL_ENV+= install_prefix=${DESTDIR:Q}
+
+DJB_RESTRICTED= no
+DJB_MAKE_TARGETS= no
+BUILD_TARGET= all
+
+pre-configure:
+ ${TOUCH} ${WRKSRC}/conf-bgincs ${WRKSRC}/conf-bglibs
+
+.include "../../devel/bglibs/buildlink3.mk"
+.include "../../mk/djbware.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/qmail-autoresponder/PLIST b/mail/qmail-autoresponder/PLIST
new file mode 100644
index 00000000000..ca1de374eb3
--- /dev/null
+++ b/mail/qmail-autoresponder/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2017/09/28 17:27:34 schmonz Exp $
+bin/qmail-autoresponder
+${PLIST.mysql}bin/qmail-autoresponder-mysql
+man/man1/qmail-autoresponder-mysql.1
+man/man1/qmail-autoresponder.1
diff --git a/mail/qmail-autoresponder/distinfo b/mail/qmail-autoresponder/distinfo
new file mode 100644
index 00000000000..8944b476c4d
--- /dev/null
+++ b/mail/qmail-autoresponder/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2017/09/28 17:27:34 schmonz Exp $
+
+SHA1 (qmail-autoresponder-1.0.tar.gz) = dbe0138cebe08133c63447a2de189be0b01adef6
+RMD160 (qmail-autoresponder-1.0.tar.gz) = 81a98a33662487bcdcc48cd7f034f7954685ed7b
+SHA512 (qmail-autoresponder-1.0.tar.gz) = 32562b9a19f11536dcc63c918c14b0485bd7ed9e02d646891e81091bfe30f029406c6c3a73a470a2e42f2eb768af3c51e334c60d1616616cc20f692a1a81f245
+Size (qmail-autoresponder-1.0.tar.gz) = 33830 bytes
+SHA1 (patch-Makefile) = 6db92ac78fb8c498436264f1fb88213a8fec2c86
+SHA1 (patch-options.c) = b232156cf689d4ec1a1a98709c6dc283dff4bcc9
diff --git a/mail/qmail-autoresponder/options.mk b/mail/qmail-autoresponder/options.mk
new file mode 100644
index 00000000000..ea946a7d1e6
--- /dev/null
+++ b/mail/qmail-autoresponder/options.mk
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.1 2017/09/28 17:27:34 schmonz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.qmail-autoresponder
+PKG_SUPPORTED_OPTIONS+= mysql
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= mysql
+.if !empty(PKG_OPTIONS:Mmysql)
+. include "../../mk/mysql.buildlink3.mk"
+BUILD_TARGET+= mysql
+PLIST.mysql= yes
+.endif
diff --git a/mail/qmail-autoresponder/patches/patch-Makefile b/mail/qmail-autoresponder/patches/patch-Makefile
new file mode 100644
index 00000000000..ead6e2e27fb
--- /dev/null
+++ b/mail/qmail-autoresponder/patches/patch-Makefile
@@ -0,0 +1,37 @@
+$NetBSD: patch-Makefile,v 1.1 2017/09/28 17:27:34 schmonz Exp $
+
+Link with bglibs 2.
+
+--- Makefile.orig 2017-08-22 23:38:24.000000000 +0000
++++ Makefile
+@@ -14,11 +14,12 @@ clean: TARGETS
+ clean-spac: clean AUTOFILES
+ rm -f `cat AUTOFILES`
+
+-compile: conf-cc
+- ( echo '#!/bin/sh'; \
++compile: conf-cc conf-bgincs
++ ( bgincs=`head -n 1 conf-bgincs`; \
++ echo '#!/bin/sh'; \
+ echo 'source=$$1; shift'; \
+ echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
+- echo exec `head -n 1 conf-cc` -I. '-o $${base}.o -c $$source $${1+"$$@"}'; \
++ echo exec `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.o -c $$source $${1+"$$@"}'; \
+ ) >compile
+ chmod 755 compile
+
+@@ -33,10 +34,11 @@ install: INSTHIER conf-bin conf-man
+
+ libraries:
+
+-load: conf-ld
+- ( echo '#!/bin/sh';\
++load: conf-ld conf-bglibs
++ ( bglibs=`head -n 1 conf-bglibs`; \
++ echo '#!/bin/sh';\
+ echo 'main="$$1"; shift';\
+- echo exec `head -n 1 conf-ld` -L. '-o "$$main" "$$main.o" $${1+"$$@"}'; \
++ echo exec `head -n 1 conf-ld` -L. "-L'$${bglibs}'" "-Wl,-R'$${bglibs}'" '-o "$$main" "$$main.o" $${1+"$$@"}'; \
+ ) >load
+ chmod 755 load
+
diff --git a/mail/qmail-autoresponder/patches/patch-options.c b/mail/qmail-autoresponder/patches/patch-options.c
new file mode 100644
index 00000000000..ffb6beac765
--- /dev/null
+++ b/mail/qmail-autoresponder/patches/patch-options.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-options.c,v 1.1 2017/09/28 17:27:34 schmonz Exp $
+
+Remove unneeded include.
+
+--- options.c.orig 2017-08-22 23:38:24.000000000 +0000
++++ options.c
+@@ -1,5 +1,4 @@
+ #define _XOPEN_SOURCE
+-#include <mysql/mysql.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <time.h>