diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2013-08-01 18:02:04 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2013-08-01 18:02:04 +0000 |
commit | d68253e6caf8dadce09781f66f77922822ea0a47 (patch) | |
tree | ab97815a6ea135e8b304d2e0b11770832db6046d | |
parent | 2609263fedc385cf9b9292c362bdf61e510f897b (diff) | |
download | ports-d68253e6caf8dadce09781f66f77922822ea0a47.tar.gz ports-d68253e6caf8dadce09781f66f77922822ea0a47.zip |
(Readdition of mail/bulk_mailer which was removed on 306404)
Readd bulk_mailer 1.13, speeds delivery to mailing lists by sorting &
batching addresses.
Notes
Notes:
svn path=/head/; revision=324116
-rw-r--r-- | MOVED | 1 | ||||
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/bulk_mailer/Makefile | 32 | ||||
-rw-r--r-- | mail/bulk_mailer/distinfo | 2 | ||||
-rw-r--r-- | mail/bulk_mailer/files/patch-Makefile.in | 12 | ||||
-rw-r--r-- | mail/bulk_mailer/files/patch-bulk_mailer.c | 161 | ||||
-rw-r--r-- | mail/bulk_mailer/pkg-descr | 7 | ||||
-rw-r--r-- | mail/bulk_mailer/pkg-plist | 4 |
8 files changed, 219 insertions, 1 deletions
@@ -3778,7 +3778,6 @@ misc/flyway||2012-10-25|Has expired: No more public distfiles mail/zabit||2012-10-25|Has expired: No more public distfiles mail/wbl||2012-10-25|Has expired: No more public distfiles mail/smtpd||2012-10-25|Has expired: No more public distfiles -mail/bulk_mailer||2012-10-25|Has expired: No more public distfiles lang/ironpython||2012-10-25|Has expired: No more public distfiles lang/cu-prolog||2012-10-25|Has expired: No more public distfiles japanese/stardict-dict-ja||2012-10-25|Has expired: No more public distfiles diff --git a/mail/Makefile b/mail/Makefile index da8a96898e97..49d1463b604d 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -40,6 +40,7 @@ SUBDIR += bogofilter-tc SUBDIR += bsfilter SUBDIR += bsmtp + SUBDIR += bulk_mailer SUBDIR += c-sig SUBDIR += c-sig-emacs21 SUBDIR += cclient diff --git a/mail/bulk_mailer/Makefile b/mail/bulk_mailer/Makefile new file mode 100644 index 000000000000..60ea63dc1162 --- /dev/null +++ b/mail/bulk_mailer/Makefile @@ -0,0 +1,32 @@ +# Created by: dlowe +# $FreeBSD$ + +PORTNAME= bulk_mailer +PORTVERSION= 1.13 +CATEGORIES= mail +MASTER_SITES= ftp://ftp.cs.utk.edu/pub/moore/bulk_mailer/ \ + ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= mat/ + +MAINTAINER= mat@FreeBSD.org +COMMENT= Speeds delivery to mailing lists by sorting & batching addresses + +GNU_CONFIGURE= YES +CONFIGURE_ARGS= --cache-file=/dev/null + +ALL_TARGET= bulk_mailer + +MAN1= bulk_mailer.1 + +.include <bsd.port.options.mk> + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/bulk_mailer ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/bulk_mailer.1 ${PREFIX}/man/man1 +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/bulk_mailer.README ${DOCSDIR}/README + ${INSTALL_DATA} ${WRKSRC}/bulk_mailer.ps ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/mail/bulk_mailer/distinfo b/mail/bulk_mailer/distinfo new file mode 100644 index 000000000000..1f56d4a51c98 --- /dev/null +++ b/mail/bulk_mailer/distinfo @@ -0,0 +1,2 @@ +SHA256 (bulk_mailer-1.13.tar.gz) = 33ac239684289a450b016517dce8d6db17563f74ee3dca96e9dd3250c84bdfd7 +SIZE (bulk_mailer-1.13.tar.gz) = 34854 diff --git a/mail/bulk_mailer/files/patch-Makefile.in b/mail/bulk_mailer/files/patch-Makefile.in new file mode 100644 index 000000000000..e492fa561a7b --- /dev/null +++ b/mail/bulk_mailer/files/patch-Makefile.in @@ -0,0 +1,12 @@ +--- Makefile.in.orig Tue Sep 1 12:37:34 1998 ++++ Makefile.in Fri Feb 12 17:36:11 1999 +@@ -1,7 +1,7 @@ +-DEFINES = @DEFS@ ++DEFINES = @DEFS@ -DDEFAULT_DOMAIN=1 -DPIPECOMMAND='"/usr/sbin/sendmail -bs %s"' + LIBS = @LIBS@ + +-CFLAGS = $(DEFINES) ++CFLAGS += -Wall $(DEFINES) + + FILES = bulk_mailer.README INSTALL bulk_mailer.c patchlevel.h Makefile + diff --git a/mail/bulk_mailer/files/patch-bulk_mailer.c b/mail/bulk_mailer/files/patch-bulk_mailer.c new file mode 100644 index 000000000000..57befc3fa769 --- /dev/null +++ b/mail/bulk_mailer/files/patch-bulk_mailer.c @@ -0,0 +1,161 @@ +--- bulk_mailer.c.orig Wed May 24 23:34:33 2000 ++++ bulk_mailer.c Thu Sep 12 17:32:58 2002 +@@ -95,11 +95,16 @@ + #include <sysexits.h> + #include <errno.h> + #include <time.h> ++#include <unistd.h> ++#include <stdlib.h> + #ifdef HAVE_STRING_H + #include <string.h> + #endif + #include "patchlevel.h" + ++#define COMMAND_BUF_SIZE (32*1024) ++#define DATEBUF_SIZE (100) ++ + #ifndef PIPECOMMAND + #define PIPECOMMAND "/usr/lib/sendmail -bs %s" + #endif +@@ -122,9 +127,11 @@ + char *strchr(); + char *strrchr(); + #endif ++#ifndef __FreeBSD__ + char *malloc (); + char *realloc (); + char *mktemp (); ++#endif + + /* + * (default) max different domains per envelope. +@@ -296,6 +303,7 @@ + * memory, appending a NUL to the copy. + */ + ++/* + static char * + strndup (str, len) + char *str; +@@ -307,6 +315,7 @@ + result[len] = '\0'; + return result; + } ++*/ + + /* + * sort by case-folded reversed domain +@@ -337,15 +346,15 @@ + { + char *at; + char *ptr; +- char *domain; ++/* char *domain; */ + char tempbuf[1024]; +- char c; ++/* char c; */ + + /* + * make sure there's room in the buffer. + */ + if (num_addrs >= num_addr_slots) { +- struct address *new; ++/* struct address *new; */ + + num_addr_slots += 1000; + if (address_list == NULL) +@@ -571,12 +580,12 @@ + open_envelope () + { + FILE *fp; +- char command_buf[32*1024]; ++ char command_buf[COMMAND_BUF_SIZE]; + + if (debug_flag) + fp = stderr; + else { +- sprintf (command_buf, PIPECOMMAND, sendmail_flags); ++ snprintf (command_buf, COMMAND_BUF_SIZE, PIPECOMMAND, sendmail_flags); + + if ((fp = popen (command_buf, "w")) == NULL) { + fprintf (stderr, "can't open pipe to sendmail: %s\n", +@@ -927,7 +936,7 @@ + { + struct tm gmt; + struct tm *lt; +- static char datebuf[100]; ++ static char datebuf[DATEBUF_SIZE]; + int gmtoff; + char sign; + static char *months[] = { +@@ -960,7 +969,7 @@ + sign = '-'; + gmtoff = -gmtoff; + } +- sprintf (datebuf, "%s, %d %s %04d %02d:%02d:%02d %c%02d%02d", ++ snprintf (datebuf, DATEBUF_SIZE, "%s, %d %s %04d %02d:%02d:%02d %c%02d%02d", + wdays[lt->tm_wday], lt->tm_mday, months[lt->tm_mon], lt->tm_year + 1900, + lt->tm_hour, lt->tm_min, lt->tm_sec, + sign, +@@ -985,7 +994,7 @@ + copy_message (out, in) + FILE *out, *in; + { +- int c; ++/* int c; */ + char linebuf[32*1024]; + int has_valid_approved_hdr = 0; + int has_resent_to_hdr = 0; +@@ -1218,14 +1227,14 @@ + */ + lines = 0; + while (fgets (linebuf, sizeof (linebuf), in) != NULL) { +- if (lines < 5 && ++ if (lines < 5 && ( + /* + * these often occur in English-text unsubscribe requests + */ + contains (linebuf, "delete me") || + contains (linebuf, "remove me") || + contains (linebuf, "subscribe") || +- contains (linebuf, "unsubscribe")) ++ contains (linebuf, "unsubscribe"))) + saw_command = 1; + ++lines; + fputs (linebuf, out); +@@ -1326,13 +1335,14 @@ + int argc; + char *argv[]; + { +- int i; ++/* int i; */ + FILE *fp; + FILE *tmp; + static char template[] = "/tmp/blkXXXXXX"; + char *tempname; +- int c; +- char buf[1024]; ++/* int c; */ ++/* char buf[1024]; */ ++ int fd; + + while (argc > 1 && (*argv[1] == '-' || *argv[1] == '+')) { + if (strcmp (argv[1], "-comment") == 0 && argc > 2) { +@@ -1513,8 +1523,9 @@ + exit (EX_OSFILE); + } + +- tempname = mktemp (template); +- tmp = fopen (template, "w"); ++ fd = mkstemp (template); ++ tempname = template; ++ tmp = fdopen (fd, "w+"); + switch (copy_message (tmp, stdin)) { + + case HAS_EMBEDDED_COMMAND: +@@ -1592,4 +1603,5 @@ + + exit (EX_OK); + } ++ exit (EX_OK); + } diff --git a/mail/bulk_mailer/pkg-descr b/mail/bulk_mailer/pkg-descr new file mode 100644 index 000000000000..0de6002b119d --- /dev/null +++ b/mail/bulk_mailer/pkg-descr @@ -0,0 +1,7 @@ +This is a C program to do "bulk" mailing. For input, it takes a file +of recipient addresses (one address per line) and a message (with +headers already attached) to be sent to the recipients. It sorts the +recipient list by reversed domain (so similar ones sort together), +splits up the recipients into several groups containing no more than N +domains each, creates an SMTP envelope for each group of recipients, +and feeds that envelope to "/usr/sbin/sendmail -bs". diff --git a/mail/bulk_mailer/pkg-plist b/mail/bulk_mailer/pkg-plist new file mode 100644 index 000000000000..13d271772a77 --- /dev/null +++ b/mail/bulk_mailer/pkg-plist @@ -0,0 +1,4 @@ +bin/bulk_mailer +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/bulk_mailer.ps +%%PORTDOCS%%@dirrm %%DOCSDIR%% |