Date: Sat, 16 Jan 2021 23:43:59 +0000 (UTC) From: Neel Chauhan <nc@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r561772 - in head/mail: . slimta slimta/files Message-ID: <202101162343.10GNhxT1041867@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nc Date: Sat Jan 16 23:43:59 2021 New Revision: 561772 URL: https://svnweb.freebsd.org/changeset/ports/561772 Log: New port: mail/slimta: Configurable MTA based on the python-slimta libraries Reviewed by: 0mp (mentor) Approved by: 0mp (mentor) Differential Revision: https://reviews.freebsd.org/D28052 Added: head/mail/slimta/ head/mail/slimta/Makefile (contents, props changed) head/mail/slimta/distinfo (contents, props changed) head/mail/slimta/files/ head/mail/slimta/files/patch-slimta_app_main.py (contents, props changed) head/mail/slimta/files/patch-slimta_app_setup.py (contents, props changed) head/mail/slimta/files/patch-slimta_app_state.py (contents, props changed) head/mail/slimta/files/slimta.in (contents, props changed) head/mail/slimta/pkg-descr (contents, props changed) Modified: head/mail/Makefile Modified: head/mail/Makefile ============================================================================== --- head/mail/Makefile Sat Jan 16 23:42:26 2021 (r561771) +++ head/mail/Makefile Sat Jan 16 23:43:59 2021 (r561772) @@ -615,6 +615,7 @@ SUBDIR += sigrot SUBDIR += simscan SUBDIR += slapd-cyrus + SUBDIR += slimta SUBDIR += sma SUBDIR += smfsav SUBDIR += smfsav-devel Added: head/mail/slimta/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/Makefile Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= slimta +PORTVERSION= 0.7.8 +CATEGORIES= mail +MASTER_SITES= CHEESESHOP + +MAINTAINER= nc@FreeBSD.org +COMMENT= Configurable MTA based on the python-slimta libraries + +LICENSE= MIT + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-slimta>0:mail/py-python-slimta@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist concurrent distutils +USE_RC_SUBR= ${PORTNAME} +REINPLACE_ARGS= -i '' +NO_ARCH= yes +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} + +PLIST_FILES= "@sample etc/slimta/logging.yaml.sample" \ + "@sample etc/slimta/slimta.yaml.sample" + +post-patch: +.for file in setup main state + @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/${PORTNAME}/app/${file}.py +.endfor + +post-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME} +.for file in logging ${PORTNAME} + @${CP} ${WRKSRC}/${PORTNAME}/app/etc/${file}.yaml.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME} +.endfor + +.include <bsd.port.mk> Added: head/mail/slimta/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/distinfo Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,3 @@ +TIMESTAMP = 1609989855 +SHA256 (slimta-0.7.8.tar.gz) = 506ee680f6accd14d48f85faf1ff8a64f53b64be19555077cdff54ba38a70501 +SIZE (slimta-0.7.8.tar.gz) = 17095 Added: head/mail/slimta/files/patch-slimta_app_main.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/files/patch-slimta_app_main.py Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,11 @@ +--- slimta/app/main.py.orig 2021-01-11 18:43:19 UTC ++++ slimta/app/main.py +@@ -44,7 +44,7 @@ def parse_args(): + default_process_name = os.path.basename(sys.argv[0]) + group = argparser.add_argument_group('config options') + group.add_argument('-c', '--config', metavar='FILE', default=None, +- help='Specifies a configuration file to read. If not given, the default locations ($HOME/.slimta/slimta.yaml, /etc/slimta/slimta.yaml) are checked.') ++ help='Specifies a configuration file to read. If not given, the default locations ($HOME/.slimta/slimta.yaml, %%PREFIX%%/etc/slimta/slimta.yaml) are checked.') + group.add_argument('-n', '--process-name', metavar='NAME', default=default_process_name, + help='Use the process sub-section NAME for configuration. (default: %(default)s)') + group.add_argument('--no-edge', action='store_true', Added: head/mail/slimta/files/patch-slimta_app_setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/files/patch-slimta_app_setup.py Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,11 @@ +--- slimta/app/setup.py.orig 2021-01-11 18:41:23 UTC ++++ slimta/app/setup.py +@@ -55,7 +55,7 @@ def _try_config_copy(etc_dir, conf_file, force): + + def _setup_configs(args): + etc_dir = args.etc_dir +- default_etc_dir = '/etc/slimta' ++ default_etc_dir = '%%PREFIX%%/etc/slimta' + if os.getuid() != 0: + default_etc_dir = '~/.slimta/' + if etc_dir is None: Added: head/mail/slimta/files/patch-slimta_app_state.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/files/patch-slimta_app_state.py Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,11 @@ +--- slimta/app/state.py.orig 2021-01-11 18:40:47 UTC ++++ slimta/app/state.py +@@ -48,7 +48,7 @@ except ImportError as exc: + class SlimtaState(object): + + _global_config_files = [os.path.expanduser('~/.slimta/slimta.yaml'), +- '/etc/slimta/slimta.yaml'] ++ '%%PREFIX%%/etc/slimta/slimta.yaml'] + + def __init__(self, args): + self.program = args.process_name Added: head/mail/slimta/files/slimta.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/files/slimta.in Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: slimta +# REQUIRE: DAEMON FILESYSTEMS NETWORKING +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable slimta. +# +# slimta_enable="YES" + +. /etc/rc.subr + +name="slimta" +rcvar="slimta_enable" + +load_rc_config $name + +: ${slimta_enable:="NO"} +: ${slimta_conf:="%%PREFIX%%/etc/slimta/slimta.yaml"} + +procname="%%PREFIX%%/bin/slimta" +pidfile=/var/run/${name}.pid +command_interpreter="%%PYTHON_CMD%%" +command="/usr/sbin/daemon" +command_args="-p $pidfile $procname -c $slimta_conf" + +run_rc_command "$1" Added: head/mail/slimta/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/slimta/pkg-descr Sat Jan 16 23:43:59 2021 (r561772) @@ -0,0 +1,5 @@ +The slimta project is a traditional application built on top of the +python-slimta library. It allows a more "out-of-the-box" MTA that offers +all the useful, built-in features needed for a normal mail system setup. + +WWW: https://www.slimta.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101162343.10GNhxT1041867>