import of mini_sendmail-1.3.2:

mini_sendmail reads its standard input up to an end-of-file and sends a
copy of the message found there to all of the addresses listed.  The
message is sent by connecting to a local SMTP server.  This means
mini_sendmail can be used to send email from inside a chroot(2) area.
This commit is contained in:
jolan 2003-07-22 23:01:16 +00:00
parent 7bd8162335
commit a5154a9c92
9 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2003/07/22 23:01:16 jolan Exp $
COMMENT= "accept email on behalf of real sendmail"
COMMENT-chroot= "static mini_sendmail for chrooted apache"
DISTNAME= mini_sendmail-1.3.2
PKGNAME-chroot= mini_sendmail-chroot-1.3.2
CATEGORIES= mail www
MASTER_SITES= ${HOMEPAGE}
HOMEPAGE= http://www.acme.com/software/mini_sendmail/
MAINTAINER= Jolan Luff <jolan@openbsd.org>
# BSD
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
NO_REGRESS= Yes
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
MULTI_PACKAGES= -chroot
SUBPACKAGE?=
.if defined(PACKAGING) && !empty(SUBPACKAGE)
PREFIX= /var/www
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/mini_sendmail ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mini_sendmail
${INSTALL_MAN} ${WRKSRC}/mini_sendmail.8 ${PREFIX}/man/man8
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/mini_sendmail
${INSTALL_PROGRAM_DIR} ${WRKINST}/var/www/bin
${INSTALL_PROGRAM} ${WRKSRC}/mini_sendmail-static \
${WRKINST}/var/www/bin/mini_sendmail
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (mini_sendmail-1.3.2.tar.gz) = f705a89b0b9aeaf28dbffbedee4cb1d3
RMD160 (mini_sendmail-1.3.2.tar.gz) = 9b172cde3d190c3db82b467faf1ecae5ede0ee2d
SHA1 (mini_sendmail-1.3.2.tar.gz) = 1e297ae27135f0f83f09c7be8a911ebfd9e2f966

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2003/07/22 23:01:16 jolan Exp $
--- Makefile.orig Fri Jan 4 00:05:25 2002
+++ Makefile Sat Jul 19 21:17:20 2003
@@ -6,14 +6,14 @@
BINDIR = /usr/local/sbin
MANDIR = /usr/local/man
-CC = gcc
-CFLAGS = -O
+#CC = gcc
+#CFLAGS = -O
#CFLAGS = -g
-LDFLAGS = -s -static
+#LDFLAGS = -s -static
#LDFLAGS = -g -static
LDLIBS = $(SYSV_LIBS)
-CC := $(DIET) $(CC)
+#CC := $(DIET) $(CC)
all: mini_sendmail
@@ -23,7 +23,8 @@ diet:
mini_sendmail: mini_sendmail.o
- $(CC) $(CFLAGS) $(LDFLAGS) mini_sendmail.o $(LDLIBS) -o mini_sendmail
+ $(CC) $(LDFLAGS) mini_sendmail.o $(LDLIBS) -o mini_sendmail
+ $(CC) $(LDFLAGS) -static mini_sendmail.o $(LDLIBS) -o mini_sendmail-static
mini_sendmail.o: mini_sendmail.c version.h
$(CC) $(CFLAGS) -c mini_sendmail.c

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-mini_sendmail_8,v 1.1.1.1 2003/07/22 23:01:16 jolan Exp $
--- mini_sendmail.8.orig Fri Jul 13 16:08:43 2001
+++ mini_sendmail.8 Sat Jul 19 22:48:11 2003
@@ -1,9 +1,11 @@
-.TH mini_sendmail 8 "12 July 2001"
+.TH mini_sendmail 8 "7 May 2003"
.SH NAME
mini_sendmail - accept email on behalf of real sendmail
.SH SYNOPSIS
.B mini_sendmail
.RB [ -f<name> ]
+.RB [ -i ]
+.RB [ -oi ]
.RB [ -t ]
.RB [ -s<server> ]
.RB [ -T<timeout> ]
@@ -24,6 +26,14 @@ can be used to send email from inside a
.TP
.B -f
Set the name of the "from" person (i.e. the sender of the mail).
+.TP
+.B -i
+Don't parse for a dot-line, but read input up to an end-of-file.
+Currently, this is always the case, but this option is needed for
+compatibility with sendmail.
+.TP
+.B -oi
+Same as -i, needed for compatibility with sendmail.
.TP
.B -t
Read message for recipients.

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-mini_sendmail_c,v 1.1.1.1 2003/07/22 23:01:16 jolan Exp $
--- mini_sendmail.c.orig Thu Nov 21 14:27:55 2002
+++ mini_sendmail.c Sat Jul 19 22:47:43 2003
@@ -129,6 +129,8 @@ main( int argc, char** argv )
timeout = atoi( &(argv[argn][2]) );
else if ( strcmp( argv[argn], "-v" ) == 0 )
verbose = 1;
+ else if ( strcmp( argv[argn], "-i" ) == 0 || strcmp ( argv[argn], "-oi" ) == 0 )
+ /* do nothing */ ;
else
usage();
++argn;
@@ -575,14 +577,16 @@ open_client_socket( void )
sock_family = PF_INET6;
#ifdef DO_MINUS_S
- if ( inet_pton( PF_INET, server, (void*) &sa4.sin_addr ) == 0 )
+
+ (void) memset( (void*) &sa4, 0, sizeof(sa4) );
+ if ( inet_pton( AF_INET, server, (void*) &sa4.sin_addr ) == 1 )
{
sock_family = PF_INET;
sa4.sin_port = htons( SMTP_PORT );
sa_len = sizeof(sa4);
(void) memmove( &sa, &sa4, sa_len );
}
- else if ( inet_pton( PF_INET6, server, (void*) &sa.sin6_addr ) == -1 )
+ else if ( inet_pton( AF_INET6, server, (void*) &sa.sin6_addr ) != 1 )
{
#ifdef DO_DNS
(void) memset( &hints, 0, sizeof(hints) );

View File

@ -0,0 +1,4 @@
mini_sendmail reads its standard input up to an end-of-file and sends a
copy of the message found there to all of the addresses listed. The
message is sent by connecting to a local SMTP server. This means
mini_sendmail can be used to send email from inside a chroot(2) area.

View File

@ -0,0 +1,2 @@
statically linked version of mini_sendmail which installs itself into
the default Apache chroot area.

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/07/22 23:01:16 jolan Exp $
bin/mini_sendmail
man/man8/mini_sendmail.8
share/doc/mini_sendmail/README
@dirrm share/doc/mini_sendmail

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PLIST-chroot,v 1.1.1.1 2003/07/22 23:01:16 jolan Exp $
bin/mini_sendmail