mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Import of bulk-mailer v1.5, a program for speeding up batched e-mail delivery to a mailing list.
Reviewed by: James FitzGibbon <jfitz@FreeBSD.ORG> Submitted by: dlowe@saturn5.com
This commit is contained in:
parent
78b8a13a08
commit
b7999ad641
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=6021
20
mail/bulk_mailer/Makefile
Normal file
20
mail/bulk_mailer/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
# New ports collection makefile for: bulk_mailer
|
||||
# Version required: 1.5
|
||||
# Date created: 20 March 1997
|
||||
# Whom: dlowe
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
DISTNAME= bulk_mailer-1.5
|
||||
CATEGORIES= mail
|
||||
|
||||
MASTER_SITES= ftp://cs.utk.edu/pub/moore/bulk_mailer/
|
||||
|
||||
EXTRACT_SUFX= .tar
|
||||
EXTRACT_BEFORE_ARGS= -C ${WRKDIR} -xf
|
||||
NO_WRKSUBDIR= YES
|
||||
|
||||
MAINTAINER= dlowe@saturn5.com
|
||||
|
||||
.include <bsd.port.mk>
|
1
mail/bulk_mailer/distinfo
Normal file
1
mail/bulk_mailer/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (bulk_mailer-1.5.tar) = 610cb591f1476f60f937c33c6639704d
|
57
mail/bulk_mailer/files/patch-aa
Normal file
57
mail/bulk_mailer/files/patch-aa
Normal file
@ -0,0 +1,57 @@
|
||||
*** Makefile.orig Sun Jan 28 17:53:14 1996
|
||||
--- Makefile Fri Mar 22 19:39:36 1996
|
||||
***************
|
||||
*** 5,28 ****
|
||||
# HASSTRERROR - whether system has strerror() call
|
||||
# LIBS - local libraries to link in (e.g. -lresolv)
|
||||
|
||||
! HASSTRDUP = # -DHAS_STRDUP
|
||||
! HASSTRERROR = # -DHAS_STRERROR
|
||||
LIBS = # -lresolv
|
||||
|
||||
DEFINES = $(HASSTRDUP) $(HASSTRERROR) $(DEFAULT_DOMAIN)
|
||||
|
||||
! CFLAGS = $(DEFINES)
|
||||
|
||||
FILES = bulk_mailer.README INSTALL bulk_mailer.c patchlevel.h Makefile
|
||||
|
||||
bulk_mailer: bulk_mailer.o
|
||||
$(CC) $(CFLAGS) -o bulk_mailer bulk_mailer.o $(LIBS)
|
||||
|
||||
bulk_mailer.o: bulk_mailer.c patchlevel.h
|
||||
$(CC) -c $(CFLAGS) bulk_mailer.c
|
||||
|
||||
install: bulk_mailer
|
||||
! cp bulk_mailer /usr/local/bin
|
||||
|
||||
clean:
|
||||
rm -f bulk_mailer bulk_mailer.o
|
||||
--- 5,32 ----
|
||||
# HASSTRERROR - whether system has strerror() call
|
||||
# LIBS - local libraries to link in (e.g. -lresolv)
|
||||
|
||||
! HASSTRDUP = -DHAS_STRDUP
|
||||
! HASSTRERROR = -DHAS_STRERROR
|
||||
LIBS = # -lresolv
|
||||
|
||||
DEFINES = $(HASSTRDUP) $(HASSTRERROR) $(DEFAULT_DOMAIN)
|
||||
|
||||
! CFLAGS = -O2 -Wall $(DEFINES)
|
||||
|
||||
FILES = bulk_mailer.README INSTALL bulk_mailer.c patchlevel.h Makefile
|
||||
|
||||
+ all: bulk_mailer
|
||||
+
|
||||
bulk_mailer: bulk_mailer.o
|
||||
$(CC) $(CFLAGS) -o bulk_mailer bulk_mailer.o $(LIBS)
|
||||
+ strip bulk_mailer
|
||||
|
||||
bulk_mailer.o: bulk_mailer.c patchlevel.h
|
||||
$(CC) -c $(CFLAGS) bulk_mailer.c
|
||||
|
||||
install: bulk_mailer
|
||||
! install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} bulk_mailer ${PREFIX}/bin/bulk_mailer
|
||||
! install -c -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} bulk_mailer.README ${PREFIX}/share/doc/bulk_mailer.README
|
||||
|
||||
clean:
|
||||
rm -f bulk_mailer bulk_mailer.o
|
165
mail/bulk_mailer/files/patch-ab
Normal file
165
mail/bulk_mailer/files/patch-ab
Normal file
@ -0,0 +1,165 @@
|
||||
*** bulk_mailer.c.original Sun Feb 11 09:49:32 1996
|
||||
--- bulk_mailer.c Fri Mar 22 18:55:32 1996
|
||||
***************
|
||||
*** 87,92 ****
|
||||
--- 87,95 ----
|
||||
#include <sysexits.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
+ #include <string.h>
|
||||
+ #include <stdlib.h>
|
||||
+ #include <unistd.h>
|
||||
#include "patchlevel.h"
|
||||
|
||||
#ifndef PIPECOMMAND
|
||||
***************
|
||||
*** 260,274 ****
|
||||
* memory, appending a NUL to the copy.
|
||||
*/
|
||||
|
||||
! static char *
|
||||
! strndup (str, len)
|
||||
! {
|
||||
! char *result = malloc_or_else (len + 1);
|
||||
!
|
||||
! strncpy (result, str, len);
|
||||
! result[len] = '\0';
|
||||
! return result;
|
||||
! }
|
||||
|
||||
/*
|
||||
* sort by case-folded reversed domain
|
||||
--- 263,277 ----
|
||||
* memory, appending a NUL to the copy.
|
||||
*/
|
||||
|
||||
! /* static char * */
|
||||
! /* strndup (str, len) */
|
||||
! /* { */
|
||||
! /* char *result = malloc_or_else (len + 1); */
|
||||
!
|
||||
! /* strncpy (result, str, len); */
|
||||
! /* result[len] = '\0'; */
|
||||
! /* return result; */
|
||||
! /* } */
|
||||
|
||||
/*
|
||||
* sort by case-folded reversed domain
|
||||
***************
|
||||
*** 299,313 ****
|
||||
{
|
||||
char *at;
|
||||
char *ptr;
|
||||
! char *domain;
|
||||
char tempbuf[1024];
|
||||
! char c;
|
||||
|
||||
/*
|
||||
* make sure there's room in the buffer.
|
||||
*/
|
||||
if (num_addrs >= num_addr_slots) {
|
||||
! struct address *new;
|
||||
|
||||
num_addr_slots += 1000;
|
||||
if (address_list == NULL)
|
||||
--- 302,316 ----
|
||||
{
|
||||
char *at;
|
||||
char *ptr;
|
||||
! /* char *domain; */
|
||||
char tempbuf[1024];
|
||||
! /* char c; */
|
||||
|
||||
/*
|
||||
* make sure there's room in the buffer.
|
||||
*/
|
||||
if (num_addrs >= num_addr_slots) {
|
||||
! /* struct address *new; */
|
||||
|
||||
num_addr_slots += 1000;
|
||||
if (address_list == NULL)
|
||||
***************
|
||||
*** 903,909 ****
|
||||
copy_message (out, in)
|
||||
FILE *out, *in;
|
||||
{
|
||||
! int c;
|
||||
char linebuf[32*1024];
|
||||
int has_valid_approved_hdr = 0;
|
||||
int has_resent_to_hdr = 0;
|
||||
--- 906,912 ----
|
||||
copy_message (out, in)
|
||||
FILE *out, *in;
|
||||
{
|
||||
! /* int c; */
|
||||
char linebuf[32*1024];
|
||||
int has_valid_approved_hdr = 0;
|
||||
int has_resent_to_hdr = 0;
|
||||
***************
|
||||
*** 1077,1090 ****
|
||||
*/
|
||||
lines = 0;
|
||||
while (fgets (linebuf, sizeof (linebuf), in) != NULL) {
|
||||
! 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"))
|
||||
saw_command = 1;
|
||||
++lines;
|
||||
fputs (linebuf, out);
|
||||
--- 1080,1093 ----
|
||||
*/
|
||||
lines = 0;
|
||||
while (fgets (linebuf, sizeof (linebuf), in) != NULL) {
|
||||
! 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")))
|
||||
saw_command = 1;
|
||||
++lines;
|
||||
fputs (linebuf, out);
|
||||
***************
|
||||
*** 1181,1193 ****
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
! int i;
|
||||
FILE *fp;
|
||||
FILE *tmp;
|
||||
static char template[] = "/tmp/blkXXXXXX";
|
||||
char *tempname;
|
||||
! int c;
|
||||
! char buf[1024];
|
||||
|
||||
while (argc > 1 && (*argv[1] == '-' || *argv[1] == '+')) {
|
||||
if (strcmp (argv[1], "-debug") == 0)
|
||||
--- 1184,1196 ----
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
! /* int i; */
|
||||
FILE *fp;
|
||||
FILE *tmp;
|
||||
static char template[] = "/tmp/blkXXXXXX";
|
||||
char *tempname;
|
||||
! /* int c; */
|
||||
! /* char buf[1024]; */
|
||||
|
||||
while (argc > 1 && (*argv[1] == '-' || *argv[1] == '+')) {
|
||||
if (strcmp (argv[1], "-debug") == 0)
|
||||
***************
|
||||
*** 1338,1341 ****
|
||||
--- 1341,1345 ----
|
||||
|
||||
exit (EX_OK);
|
||||
}
|
||||
+ exit (EX_OK);
|
||||
}
|
1
mail/bulk_mailer/pkg-comment
Normal file
1
mail/bulk_mailer/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Speeds delivery to large mailing lists by sorting & batching addresses.
|
8
mail/bulk_mailer/pkg-descr
Normal file
8
mail/bulk_mailer/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
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".
|
||||
|
2
mail/bulk_mailer/pkg-plist
Normal file
2
mail/bulk_mailer/pkg-plist
Normal file
@ -0,0 +1,2 @@
|
||||
bin/bulk_mailer
|
||||
share/doc/bulk_mailer.README
|
Loading…
Reference in New Issue
Block a user