OpenSMTPD is a FREE implementation of the server-side SMTP protocol

as defined by RFC 5321, with some additional standard extensions.
It allows ordinary machines to exchange e-mails with other systems
speaking the SMTP protocol.

Started out of dissatisfaction with other implementations, OpenSMTPD
nowadays is a fairly complete SMTP implementation.

OpenSMTPD is primarily developed by Gilles Chehade, Eric Faurot and
Charles Longeau; with contributions from various OpenBSD hackers.
This commit is contained in:
pettai 2013-11-18 22:50:01 +00:00
parent e1b0af3dbf
commit 8398b98d23
10 changed files with 200 additions and 0 deletions

10
mail/opensmtpd/DESCR Normal file
View file

@ -0,0 +1,10 @@
OpenSMTPD is a FREE implementation of the server-side SMTP protocol
as defined by RFC 5321, with some additional standard extensions.
It allows ordinary machines to exchange e-mails with other systems
speaking the SMTP protocol.
Started out of dissatisfaction with other implementations, OpenSMTPD
nowadays is a fairly complete SMTP implementation.
OpenSMTPD is primarily developed by Gilles Chehade, Eric Faurot and
Charles Longeau; with contributions from various OpenBSD hackers.

60
mail/opensmtpd/Makefile Normal file
View file

@ -0,0 +1,60 @@
# $NetBSD: Makefile,v 1.1 2013/11/18 22:50:01 pettai Exp $
VERSION= 5.3.3p1
DISTNAME= opensmtpd-${VERSION}
CATEGORIES= mail net
MASTER_SITES= http://www.opensmtpd.org/archives/
MAINTAINER= ftigeot@wolfpond.org
HOMEPAGE= http://www.opensmtpd.org/
COMMENT= The OpenSMTPD mail transfer agent, a replacement for sendmail
LICENSE= isc AND modified-bsd AND 2-clause-bsd
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]* postfix-[0-9]*
BUILD_DEFS+= VARBASE
USE_LANGUAGES= c
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config
USE_TOOLS+= automake aclocal autoheader autoconf
SMTPD_HOME= ${VARBASE}/chroot/smtpd
OWN_DIRS= ${SMTPD_HOME}
PKG_GROUPS= _smtpd
PKG_USERS= _smtpd:_smtpd
PKG_GECOS._smtpd= OpenSMTPD pseudo-user
PKG_HOME._smtpd= ${SMTPD_HOME}
GNU_CONFIGURE= yes
EXAMPLEDIR= ${PREFIX}/share/examples/opensmtpd
CONF_FILES= ${EXAMPLEDIR}/smtpd.conf ${PKG_SYSCONFDIR}/smtpd.conf
RCD_SCRIPTS= opensmtpd
SUBST_CLASSES+= paths
SUBST_FILES.paths= ${WRKDIR}/mailer.conf
SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
SUBST_STAGE.paths= post-patch
SUBST_CLASSES+= exampledir
SUBST_STAGE.exampledir= pre-configure
SUBST_MESSAGE.exampledir= Fixing exampledir path
SUBST_FILES.exampledir= smtpd/Makefile.am
SUBST_SED.exampledir+= -e 's,@EXAMPLE_DIR@,${EXAMPLEDIR},'
post-extract:
cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
pre-configure:
set -e; cd ${WRKSRC} && ${SH} ./bootstrap
post-install:
${INSTALL_DATA} ${WRKDIR}/mailer.conf \
${DESTDIR}${EXAMPLEDIR}/mailer.conf
.include "../../devel/libevent/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

19
mail/opensmtpd/PLIST Normal file
View file

@ -0,0 +1,19 @@
@comment $NetBSD: PLIST,v 1.1 2013/11/18 22:50:01 pettai Exp $
bin/mailq
bin/newaliases
bin/smtpscript
libexec/mail.local
libexec/opensmtpd/makemap
man/man5/aliases.5
man/man5/forward.5
man/man5/smtpd.conf.5
man/man8/makemap.8
man/man8/newaliases.8
man/man8/smtpctl.8
man/man8/smtpd.8
sbin/makemap
sbin/smtpctl
sbin/smtpd
share/examples/opensmtpd/mailer.conf
share/examples/opensmtpd/smtpd.conf
share/examples/rc.d/opensmtpd

9
mail/opensmtpd/distinfo Normal file
View file

@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.1 2013/11/18 22:50:01 pettai Exp $
SHA1 (opensmtpd-5.3.3p1.tar.gz) = a7fc3a15b5dc622410fcedf51bbe62e6b6d64df3
RMD160 (opensmtpd-5.3.3p1.tar.gz) = 97f63e37fa6ce1f5f58d816088c5b356f99167c3
Size (opensmtpd-5.3.3p1.tar.gz) = 343733 bytes
SHA1 (patch-bootstrap) = c53e2d32429fcdfbef126652ac8e38a2b76344cb
SHA1 (patch-configure.ac) = ed819952951700c057c11200095a72972aafc1f9
SHA1 (patch-smtpd_Makefile.am) = 4267002ecadceaf68868b9d782d5e6f8571ebc36
SHA1 (patch-smtpd_queue_fsqueue.c) = 80dae37705378c022c1a76d31ea54a3f907b6c1a

View file

@ -0,0 +1,7 @@
# $NetBSD: mailer.conf,v 1.1 2013/11/18 22:50:01 pettai Exp $
#
# Use "opensmtpd" replacements
#
sendmail @PREFIX@/libexec/mail.local
mailq @PREFIX@/bin/mailq
newaliases @PREFIX@/bin/newaliases

View file

@ -0,0 +1,19 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: opensmtpd.sh,v 1.1 2013/11/18 22:50:01 pettai Exp $
#
# PROVIDE: mail
# REQUIRE: LOGIN
# we make mail start late, so that things like .forward's are not
# processed until the system is fully operational
. /etc/rc.subr
name="smtpd"
rcvar=opensmtpd
command="@PREFIX@/sbin/${name}"
required_files="@PKG_SYSCONFDIR@/smtpd.conf"
load_rc_config $name
run_rc_command "$1"

View file

@ -0,0 +1,15 @@
$NetBSD: patch-bootstrap,v 1.1 2013/11/18 22:50:01 pettai Exp $
Add support for newer automake
--- bootstrap.orig 2013-11-18 09:00:56.000000000 +0000
+++ bootstrap
@@ -36,7 +36,7 @@ aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL
# Check for automake
amvers="no"
-for v in 13 12 11 10 9 8 7 6 5; do
+for v in 14 13 12 11 10 9 8 7 6 5; do
if automake-1.${v} --version >/dev/null 2>&1; then
amvers="-1.${v}"
break

View file

@ -0,0 +1,14 @@
$NetBSD: patch-configure.ac,v 1.1 2013/11/18 22:50:01 pettai Exp $
Add sys/statvfs for NetBSD
--- configure.ac.orig 2013-05-16 15:19:59.000000000 +0000
+++ configure.ac
@@ -261,6 +261,7 @@ AC_CHECK_HEADERS([ \
sys/ndir.h \
sys/pstat.h \
sys/statfs.h \
+ sys/statvfs.h \
sys/un.h \
ucred.h \
util.h \

View file

@ -0,0 +1,29 @@
$NetBSD: patch-smtpd_Makefile.am,v 1.1 2013/11/18 22:50:01 pettai Exp $
Install the configuration file in the example directory
--- smtpd/Makefile.am.orig 2013-03-08 18:22:39.000000000 +0000
+++ smtpd/Makefile.am
@@ -154,17 +154,16 @@ $(CONFIGFILES): $(CONFIGFILES_IN)
# smtpd.conf
# newaliases makemap
+
+EXAMPLE_DIR=@EXAMPLE_DIR@
+
install-exec-hook: $(CONFIGFILES) $(MANPAGES)
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)
+ $(MKDIR_P) $(DESTDIR)$(EXAMPLE_DIR)
$(MKDIR_P) $(DESTDIR)$(bindir)
$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
- @if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then \
- $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \
- else \
- echo "$(DESTDIR)$(sysconfdir)/smtpd.conf already exists, install will not overwrite"; \
- fi
+ $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(EXAMPLE_DIR)/smtpd.conf
ln -f $(DESTDIR)$(sbindir)/smtpctl$(EXEEXT) \
$(DESTDIR)$(bindir)/mailq$(EXEEXT);

View file

@ -0,0 +1,18 @@
$NetBSD: patch-smtpd_queue_fsqueue.c,v 1.1 2013/11/18 22:50:01 pettai Exp $
NetBSD use statvfs, not statfs.
--- smtpd/queue_fsqueue.c.orig 2013-05-16 15:19:59.000000000 +0000
+++ smtpd/queue_fsqueue.c
@@ -26,5 +26,11 @@
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#ifdef __NetBSD__
+#define statfs statvfs
+#endif
+#endif
#include <sys/param.h>
#include <sys/mount.h>