1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

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/
This commit is contained in:
Edwin Groothuis 2009-11-10 10:12:23 +00:00
parent fb81c3a71b
commit 8b1e2ef0ab
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=244063
9 changed files with 127 additions and 0 deletions

View File

@ -16,6 +16,7 @@
SUBDIR += antivirus-milter
SUBDIR += anubis
SUBDIR += archivemail
SUBDIR += archivesmtp
SUBDIR += archmbox
SUBDIR += ask
SUBDIR += asmail

55
mail/archivesmtp/Makefile Normal file
View File

@ -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>

View File

@ -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

View File

@ -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"

View File

@ -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/
###############################################################################

View File

@ -0,0 +1,5 @@
PROG= archivesmtp
SRCS= ArchiveSMTP.c
MAN= archivesmtp.8
.include <bsd.prog.mk>

View File

@ -0,0 +1,3 @@
SUBDIR= src
.include <bsd.subdir.mk>

View File

@ -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/

View File

@ -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%%