aboutsummaryrefslogtreecommitdiff
path: root/mail/archivesmtp
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2009-11-10 10:12:23 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2009-11-10 10:12:23 +0000
commit8b1e2ef0abeb1274c0c9a18f63d56fce41ad9970 (patch)
treea6a4c36694c3a25748e138a89aa6ac276c959f6b /mail/archivesmtp
parentfb81c3a71ba8b997129380e61d0bf78824218720 (diff)
downloadports-8b1e2ef0abeb1274c0c9a18f63d56fce41ad9970.tar.gz
ports-8b1e2ef0abeb1274c0c9a18f63d56fce41ad9970.zip
new port: mail/archivestmp
ArchiveSMTP is a mail archiver designed to be run on an SMTP mail server. It uses rule-based matching to collect and store mail passing through an MTA to specific locations in mbox format. The libmilter interface is used and must be supported by the MTA for ArchiveSMTP to work. WWW: http://www.dancingfortune.com/projects/archivesmtp/
Notes
Notes: svn path=/head/; revision=244063
Diffstat (limited to 'mail/archivesmtp')
-rw-r--r--mail/archivesmtp/Makefile55
-rw-r--r--mail/archivesmtp/distinfo3
-rw-r--r--mail/archivesmtp/files/archivesmtp.in27
-rw-r--r--mail/archivesmtp/files/pkg-message.in20
-rw-r--r--mail/archivesmtp/files/src-Makefile5
-rw-r--r--mail/archivesmtp/files/top-Makefile3
-rw-r--r--mail/archivesmtp/pkg-descr6
-rw-r--r--mail/archivesmtp/pkg-plist7
8 files changed, 126 insertions, 0 deletions
diff --git a/mail/archivesmtp/Makefile b/mail/archivesmtp/Makefile
new file mode 100644
index 000000000000..876550b821ec
--- /dev/null
+++ b/mail/archivesmtp/Makefile
@@ -0,0 +1,55 @@
+# New ports collection makefile for: archivesmtp
+# Date created: 1 Nov 2009
+# Whom: Netherby <netherby@dancingfortune.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= archivesmtp
+PORTVERSION= 1.0.b1
+CATEGORIES= mail
+MASTER_SITES= http://www.dancingfortune.com/projects/archivesmtp/files/
+
+MAINTAINER= contact@dancingfortune.com
+COMMENT= SMTP mail archiver
+
+CFLAGS+= ${PTHREAD_CFLAGS}
+LIBS+= ${PTHREAD_LIBS} -lmilter
+MAKE_ENV+= LDADD="${LIBS}" \
+ BINDIR="${PREFIX}/sbin" \
+ MANDIR="${MANPREFIX}/man/man" \
+ NO_MANCOMPRESS="yes"
+
+USE_RC_SUBR= archivesmtp
+SUB_FILES= pkg-message
+SUB_LIST= SOCKETBASE=${SOCKETBASE} \
+ SOCKETDIR=${SOCKETDIR}
+PLIST_SUB+= ${SUB_LIST}
+
+MAN8= archivesmtp.8
+
+# Path for unix/local socket (by default also used for pid file)
+SOCKETBASE?= /var/run
+SOCKETDIR?= archivesmtp
+
+.include <bsd.port.pre.mk>
+
+# Sets up libmilter dependencies and options
+.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
+
+pre-build:
+ # Copy BSD Makefiles into build tree
+ ${CP} ${FILESDIR}/top-Makefile ${WRKSRC}/Makefile
+ ${CP} ${FILESDIR}/src-Makefile ${WRKSRC}/src/Makefile
+
+post-install:
+ # Install sample configuration file
+ ${INSTALL_DATA} ${WRKSRC}/src/archivesmtp.conf.sample ${PREFIX}/etc
+ # Create directory for unix/local socket
+ ${MKDIR} ${SOCKETBASE}/${SOCKETDIR}
+ ${CHOWN} nobody ${SOCKETBASE}/${SOCKETDIR}
+ ${CHMOD} 755 ${SOCKETBASE}/${SOCKETDIR}
+ # Print post install message
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/mail/archivesmtp/distinfo b/mail/archivesmtp/distinfo
new file mode 100644
index 000000000000..2dd6c6e68aee
--- /dev/null
+++ b/mail/archivesmtp/distinfo
@@ -0,0 +1,3 @@
+MD5 (archivesmtp-1.0.b1.tar.gz) = f5efe43c68afddead393dc8de39a0f5a
+SHA256 (archivesmtp-1.0.b1.tar.gz) = 32c85cc4aa741a50fd837c89ad28eea44f0d4ba58500c034868e090a7f4602b8
+SIZE (archivesmtp-1.0.b1.tar.gz) = 95646
diff --git a/mail/archivesmtp/files/archivesmtp.in b/mail/archivesmtp/files/archivesmtp.in
new file mode 100644
index 000000000000..3653b330931e
--- /dev/null
+++ b/mail/archivesmtp/files/archivesmtp.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# PROVIDE: archivesmtp
+# BEFORE: mail
+
+. %%RC_SUBR%%
+
+name="archivesmtp"
+rcvar="${name}_enable"
+
+command="%%PREFIX%%/sbin/${name}"
+
+# Read settings and set defaults
+load_rc_config $name
+
+: ${archivesmtp_enable="NO"}
+: ${archivesmtp_chuser="nobody"}
+: ${archivesmtp_socket="unix:%%SOCKETBASE%%/%%SOCKETDIR%%/mta.sock"}
+: ${archivesmtp_config="%%PREFIX%%/etc/archivesmtp.conf"}
+: ${archivesmtp_pidfile="%%SOCKETBASE%%/%%SOCKETDIR%%/run.pid"}
+: ${archivesmtp_flags=""}
+
+pidfile="${archivesmtp_pidfile}"
+
+command_args="${archivesmtp_flags} -p ${archivesmtp_socket} -f ${archivesmtp_config} -u ${archivesmtp_chuser} -r ${archivesmtp_pidfile} &"
+
+run_rc_command "$1"
diff --git a/mail/archivesmtp/files/pkg-message.in b/mail/archivesmtp/files/pkg-message.in
new file mode 100644
index 000000000000..8d7940e5912d
--- /dev/null
+++ b/mail/archivesmtp/files/pkg-message.in
@@ -0,0 +1,20 @@
+###############################################################################
+
+ ArchiveSMTP has been installed! You will, however, need to configure your MTA
+ to use it as a 'milter'. Please consult your MTA's documentation reguarding
+ this. For rule formats check the manpage and sample configuration file. The
+ following rc values can be adjusted to your preference; listed are their
+ default values:
+
+ Enable port -> archivesmtp_enable="NO"
+ Run as user -> archivesmtp_chuser="nobody"
+ Filter socket -> archivesmtp_socket="unix:%%SOCKETBASE%%/%%SOCKETDIR%%/mta.sock"
+ Pid file -> archivesmtp_pidfile="%%SOCKETBASE%%/%%SOCKETDIR%%/run.pid"
+ Configuration -> archivesmtp_config="%%PREFIX%%/etc/archivesmtp.conf"
+ Other Flags -> archuvesmtp_flags=""
+
+ Please note: Only the owner my have write permissions on the socket directory.
+
+ Visit the website at: http://www.dancingfortune.com/projects/archivesmtp/
+
+############################################################################### \ No newline at end of file
diff --git a/mail/archivesmtp/files/src-Makefile b/mail/archivesmtp/files/src-Makefile
new file mode 100644
index 000000000000..2294c4c1fb3c
--- /dev/null
+++ b/mail/archivesmtp/files/src-Makefile
@@ -0,0 +1,5 @@
+PROG= archivesmtp
+SRCS= ArchiveSMTP.c
+MAN= archivesmtp.8
+
+.include <bsd.prog.mk>
diff --git a/mail/archivesmtp/files/top-Makefile b/mail/archivesmtp/files/top-Makefile
new file mode 100644
index 000000000000..c23e0c8e1a50
--- /dev/null
+++ b/mail/archivesmtp/files/top-Makefile
@@ -0,0 +1,3 @@
+SUBDIR= src
+
+.include <bsd.subdir.mk>
diff --git a/mail/archivesmtp/pkg-descr b/mail/archivesmtp/pkg-descr
new file mode 100644
index 000000000000..1ab78a6ed532
--- /dev/null
+++ b/mail/archivesmtp/pkg-descr
@@ -0,0 +1,6 @@
+ArchiveSMTP is a mail archiver designed to be run on an SMTP mail server. It
+uses rule-based matching to collect and store mail passing through an MTA to
+specific locations in mbox format. The libmilter interface is used and must be
+supported by the MTA for ArchiveSMTP to work.
+
+WWW: http://www.dancingfortune.com/projects/archivesmtp/
diff --git a/mail/archivesmtp/pkg-plist b/mail/archivesmtp/pkg-plist
new file mode 100644
index 000000000000..5a76b633d86d
--- /dev/null
+++ b/mail/archivesmtp/pkg-plist
@@ -0,0 +1,7 @@
+sbin/archivesmtp
+etc/archivesmtp.conf.sample
+@stopdaemon archivesmtp
+@exec mkdir -p %%SOCKETBASE%%/%%SOCKETDIR%%
+@exec chown nobody %%SOCKETBASE%%/%%SOCKETDIR%%
+@cwd %%SOCKETBASE%%
+@dirrm %%SOCKETDIR%%