summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorpettai <pettai@pkgsrc.org>2013-11-18 22:50:01 +0000
committerpettai <pettai@pkgsrc.org>2013-11-18 22:50:01 +0000
commit2194cbdd7164a36118b67bcc0f6966e0e122297a (patch)
treee1eea6ca38ad220b9b1cd8292402b718ce55966d /mail
parent48657883a01af343d47ac35f3a166dbc59f041e5 (diff)
downloadpkgsrc-2194cbdd7164a36118b67bcc0f6966e0e122297a.tar.gz
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.
Diffstat (limited to 'mail')
-rw-r--r--mail/opensmtpd/DESCR10
-rw-r--r--mail/opensmtpd/Makefile60
-rw-r--r--mail/opensmtpd/PLIST19
-rw-r--r--mail/opensmtpd/distinfo9
-rw-r--r--mail/opensmtpd/files/mailer.conf7
-rw-r--r--mail/opensmtpd/files/opensmtpd.sh19
-rw-r--r--mail/opensmtpd/patches/patch-bootstrap15
-rw-r--r--mail/opensmtpd/patches/patch-configure.ac14
-rw-r--r--mail/opensmtpd/patches/patch-smtpd_Makefile.am29
-rw-r--r--mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c18
10 files changed, 200 insertions, 0 deletions
diff --git a/mail/opensmtpd/DESCR b/mail/opensmtpd/DESCR
new file mode 100644
index 00000000000..5588b3e2b67
--- /dev/null
+++ b/mail/opensmtpd/DESCR
@@ -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.
diff --git a/mail/opensmtpd/Makefile b/mail/opensmtpd/Makefile
new file mode 100644
index 00000000000..1fb82920052
--- /dev/null
+++ b/mail/opensmtpd/Makefile
@@ -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"
diff --git a/mail/opensmtpd/PLIST b/mail/opensmtpd/PLIST
new file mode 100644
index 00000000000..41181bb6a80
--- /dev/null
+++ b/mail/opensmtpd/PLIST
@@ -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
diff --git a/mail/opensmtpd/distinfo b/mail/opensmtpd/distinfo
new file mode 100644
index 00000000000..d9f125e60bf
--- /dev/null
+++ b/mail/opensmtpd/distinfo
@@ -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
diff --git a/mail/opensmtpd/files/mailer.conf b/mail/opensmtpd/files/mailer.conf
new file mode 100644
index 00000000000..18c70d3f15a
--- /dev/null
+++ b/mail/opensmtpd/files/mailer.conf
@@ -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
diff --git a/mail/opensmtpd/files/opensmtpd.sh b/mail/opensmtpd/files/opensmtpd.sh
new file mode 100644
index 00000000000..31417bb79df
--- /dev/null
+++ b/mail/opensmtpd/files/opensmtpd.sh
@@ -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"
diff --git a/mail/opensmtpd/patches/patch-bootstrap b/mail/opensmtpd/patches/patch-bootstrap
new file mode 100644
index 00000000000..df020843fa2
--- /dev/null
+++ b/mail/opensmtpd/patches/patch-bootstrap
@@ -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
diff --git a/mail/opensmtpd/patches/patch-configure.ac b/mail/opensmtpd/patches/patch-configure.ac
new file mode 100644
index 00000000000..04f8f7e1508
--- /dev/null
+++ b/mail/opensmtpd/patches/patch-configure.ac
@@ -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 \
diff --git a/mail/opensmtpd/patches/patch-smtpd_Makefile.am b/mail/opensmtpd/patches/patch-smtpd_Makefile.am
new file mode 100644
index 00000000000..a5c0087c47c
--- /dev/null
+++ b/mail/opensmtpd/patches/patch-smtpd_Makefile.am
@@ -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);
diff --git a/mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c b/mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c
new file mode 100644
index 00000000000..99ad4e428a2
--- /dev/null
+++ b/mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c
@@ -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>