summaryrefslogtreecommitdiff
path: root/mail-filter/postfwd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
commitdc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch)
treec85d72f6f31f21f178069c9d41d41a7c1ff4b362 /mail-filter/postfwd
parent0706fc6986773f4e4d391deff4ad5143c464ea4e (diff)
gentoo resync : 05.04.2019
Diffstat (limited to 'mail-filter/postfwd')
-rw-r--r--mail-filter/postfwd/Manifest7
-rw-r--r--mail-filter/postfwd/files/postfwd.conf.318
-rw-r--r--mail-filter/postfwd/files/postfwd.init.327
-rw-r--r--mail-filter/postfwd/files/postfwd.init.3-r111
-rw-r--r--mail-filter/postfwd/files/postfwd.service.311
-rw-r--r--mail-filter/postfwd/postfwd-2.00-r1.ebuild87
-rw-r--r--mail-filter/postfwd/postfwd-2.00.ebuild97
7 files changed, 258 insertions, 0 deletions
diff --git a/mail-filter/postfwd/Manifest b/mail-filter/postfwd/Manifest
index 8df0334ff132..92ac2173b044 100644
--- a/mail-filter/postfwd/Manifest
+++ b/mail-filter/postfwd/Manifest
@@ -1,6 +1,13 @@
AUX postfwd.conf 429 BLAKE2B 9a899d660732afe05e893fb689b483264f42a08f23603cc251f54d52ec1a22e26b71cd1903f18b8778f19ea4d69e362587b86795bced1b7bba2cb702a40757ee SHA512 409d31933fa172af728e6fa2c3dddb1280a3fff5ea6bb9732c5e69e6266f92848553777773edf939bdf387544f9d0c1a5dd764b4c3c11aa2ceeebd5ceafc9fa5
+AUX postfwd.conf.3 421 BLAKE2B 689d11d9a9f71ef84dea8ee01bd20f9406534025a23ec5fc34a7cdfe4d9fb40d68b7d1e94640ff9aa698c21b77e190cf85aa0cf2d2ddb597093742db64cd535d SHA512 c13a0c35c57d7387d36ebc483f37ca4a80f0a7221ec4f7c243a8dd3ab7871b11a3554f1dc38d5b6c10103c508ce91c15c68bea08a427f01825607c17b66d4943
AUX postfwd.init 632 BLAKE2B dd15670e8e372e1c785314501102c4f22f67e5da43edaa6e5f2815a37be777672d10ad9e454d57607773609f59c3fe61e4c96d29553f1e492c8de3c6a867dc0a SHA512 132e5b44352ab6d8ca9eb565217fba77db311c3a604509407f079587e1f6147d4a4aa105348113c596f1186fbea1e1e0a7ccd7c7be9fe29bfa8404e7f08c950e
+AUX postfwd.init.3 629 BLAKE2B 08d4a9ea497827b3f2062b36bdf62812fef572edf2eae4be905443452a7914612813bec1444450b02fbe37ff42ebaec3fc84fec3a59a217d08e198c625818ae5 SHA512 154120a05506710c2f9b3faae4119e96b3366b34e84ab650e2a24152ea3d342821130409843469982debdd7b12c740262210684cbf887657fded44b52d1f7bff
+AUX postfwd.init.3-r1 416 BLAKE2B 3643658faf4edb22aa1e1de2fdc3a3ee6f436f30a08b0e0046279e4b44b051a8f943afcb7e268b14fc7d13f3e822ad379cc70d53459b9c43191db9d80ddb4e81 SHA512 86bef531d1c6bf27284b0de13eae372ff9b5c62eb0ee04957e0ff740c391d221544f19e8dc0bd58408fe9effac9387afbf1ededb9e0ebae02d92478a77463eb9
AUX postfwd.service 596 BLAKE2B b11a4f82fcf52556dc0271c29c68feb268b5ce9afc684b81401fb6c8272c177ebe13ff8f64ba9350c84d5fd62ead30d7f9598e69c8012022665d3900a9c899e4 SHA512 5b8e7ce6314cf61eaea13eb582b7e215209fc43bfd506fa1b1423873efb208ae5da8f8a9651358653bd91d436965f1582cc1bf226b0b44ec442869e66c0254e9
+AUX postfwd.service.3 572 BLAKE2B 92963bc0a479994a43556a8e1afbcca46544351ad967d448dd2255a9af13f7b1f69242421f7bc14f0ac6f0a2840b90af4d68b07eb98576bf20cff8ea3b8c6fe7 SHA512 0cc4942230d9a435cc9a49b888de95dcbe038da087eda03cc1f6347cb67e8640ab0810f55c921afdc0456c21a9cc06f562c395538b0548c492d7aadd8cdf9478
DIST postfwd-1.35.tar.gz 354609 BLAKE2B 8e85db37d7f81be4613d9c2e411760af48650125af7b22439e3b47a8c3c7285564bfcd7a9fe4eed35d2603ddf80dcdf11d75f84afcaf3e57d53c4e986068f06c SHA512 7b0e8c8a755f085c108c45b28ec8c32139581ce129d0b8586f1876ae87f134a4fb1606d45105ccfa62351ca2d3b87f001ea52aacab0680f3345c41562bec5207
+DIST postfwd-2.00.tar.gz 265346 BLAKE2B ec67bffb5f6959e9516965516688e72f337f717a3159a094dc0373331a5fc09a451f664643a7f3e739b28d4137c130acfb39129b8557b4d41f4d445679f52623 SHA512 b9994b7dd96f1460d66ef35f173c5a4a4d72beb5b955092349304eae2672182874f07236fe5512ba3d0ecc68e2f0472e76b3667ded011536b0cf6f2d874bb039
EBUILD postfwd-1.35-r3.ebuild 2249 BLAKE2B 27265ee578452dcc2ba2ea26715da9096cc69338e1ab468291a8d7cca41ee086efc3c2c073351440a941a9e9647f81b1c23405bc75d6db1e22847a567d14342c SHA512 1d54c65e8a5bb3ca5a7a9c0d010298c59ac9dcb840108cccf4e02afdb6d433f84cfd658415347baa7cb677f26e0f8547a7be56aa1daa394bbc80315adb114cd0
+EBUILD postfwd-2.00-r1.ebuild 2364 BLAKE2B 43abdcb97314874953742729023cf679054d49e034f39b10ce9c491c25c0c5c813270d4cd0ce1f824efb7927247a1edbb459a649accc885451194469d603fcb5 SHA512 e42a004bce7b32f365ccd6f337f68cb5b537c295747845800c24044934877797a40e19fae977d07f19cf8e692645b1b6332f844d5a8fd1f13b76e79fa96f99d7
+EBUILD postfwd-2.00.ebuild 2522 BLAKE2B d436f1e9a9ea924b6999064d6231c92ca01f6e3499b748667f28d6b4a58a46f54746479abc57515d93481185d73e3f0baf974cd2864de81d3ed1f8c3e8e69344 SHA512 badf3029a8e798df302facfc44d1e348b6046e7004e24fabcd3414d7a4220e72d4f6879f6a9ff6dffa1e6a014cf9661cf5d7463eeb9788c971ae804ffc5a3fac
MISC metadata.xml 1223 BLAKE2B c42b60106ab2dbbed00dcedf73347b95c4011afe1a12c76b6d4aec3d186f1c037e79e9c47ab9d5a56dc26d4fe3291b42218748a42856c5a46b23857087de8b30 SHA512 e9e6433e9bec304617bc0d57977781991b7891e1531224fef8db93df3576367c624785be9c844453e1747e798e50b8e8d93e6114143495183a8ad47228b52376
diff --git a/mail-filter/postfwd/files/postfwd.conf.3 b/mail-filter/postfwd/files/postfwd.conf.3
new file mode 100644
index 000000000000..578b0516171e
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.conf.3
@@ -0,0 +1,18 @@
+# /etc/conf.d/postfwd.conf
+
+# User and group to execute postfwd as
+POSTFWD_USER="postfwd"
+POSTFWD_GROUP="postfwd"
+
+# Configuration file to use
+POSTFWD_CONFIG="/etc/postfwd.cf"
+
+# The IP address postfwd will listen on
+# WARNING: You _really_ want this to be localhost for security!
+POSTFWD_LISTEN="127.0.0.1"
+
+# The port postfwd will listen on
+POSTFWD_PORT="10040"
+
+# Additional options to pass to postfwd
+POSTFWD_OPTS=""
diff --git a/mail-filter/postfwd/files/postfwd.init.3 b/mail-filter/postfwd/files/postfwd.init.3
new file mode 100644
index 000000000000..7fc17344a31d
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.init.3
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=/var/run/postfwd.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting postfwd"
+ start-stop-daemon --start --quiet --background \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/postfwd3 -- --daemon --file ${POSTFWD_CONFIG} \
+ --interface=${POSTFWD_LISTEN} --port=${POSTFWD_PORT} \
+ --user=${POSTFWD_USER} --group=${POSTFWD_GROUP} \
+ --pidfile ${PIDFILE} \
+ ${POSTFWD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping postfwd"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/mail-filter/postfwd/files/postfwd.init.3-r1 b/mail-filter/postfwd/files/postfwd.init.3-r1
new file mode 100644
index 000000000000..496fea757208
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.init.3-r1
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/postfwd3"
+command_args="--nodaemon --file ${POSTFWD_CONFIG} --interface=${POSTFWD_LISTEN} \
+ --port=${POSTFWD_PORT} ${POSTFWD_OPTS}"
+command_background=true
+command_user="${POSTFWD_USER}:${POSTFWD_GROUP}"
+pidfile="/run/${RC_SVCNAME}.pid"
+required_files="${POSTFWD_CONFIG}"
diff --git a/mail-filter/postfwd/files/postfwd.service.3 b/mail-filter/postfwd/files/postfwd.service.3
new file mode 100644
index 000000000000..b1d3b45cce5c
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.service.3
@@ -0,0 +1,11 @@
+[Unit]
+Description=Postfix firewall daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/postfwd3 --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --daemon --file=/etc/postfwd.cf --interface=127.0.0.1 --port=10040 --pidfile=/var/run/postfwd.pid --user=postfwd --group=postfwd
+ExecStop=/usr/sbin/postfwd3 --file=/etc/postfwd.cf --pidfile=/var/run/postfwd.pid --kill
+ExecReload=/usr/sbin/postfwd3 --file=/etc/postfwd.cf --pidfile=/var/run/postfwd.pid --reload
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mail-filter/postfwd/postfwd-2.00-r1.ebuild b/mail-filter/postfwd/postfwd-2.00-r1.ebuild
new file mode 100644
index 000000000000..df52b4a6f052
--- /dev/null
+++ b/mail-filter/postfwd/postfwd-2.00-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd user
+
+DESCRIPTION="Versatile Postfix policy server with a flexible ruleset based configuration"
+HOMEPAGE="https://www.postfwd.org/"
+SRC_URI="https://www.postfwd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=""
+RDEPEND=">=dev-lang/perl-5.16.3
+ dev-perl/Net-CIDR-Lite
+ dev-perl/Net-DNS
+ dev-perl/Net-Server
+ dev-perl/NetAddr-IP
+ virtual/perl-Digest-MD5
+ virtual/perl-Storable
+ virtual/perl-Sys-Syslog
+ virtual/perl-Time-HiRes
+"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ enewgroup postfwd
+ enewuser postfwd -1 -1 -1 postfwd
+}
+
+src_install() {
+ local BIN="postfwd3"
+ # program
+ dosbin sbin/${BIN}
+
+ # man pages and documentation
+ doman man/man8/${BIN}.8
+ dodoc doc/{${BIN}.CHANGELOG,${BIN}.txt}
+
+ # example configuration
+ dodoc etc/${PN}.cf.sample
+
+ # plugins and tools
+ dodoc -r plugins tools
+
+ # start scripts script and respective configuration file
+ newinitd "${FILESDIR}"/${PN}.init.3-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.3 ${PN}
+ systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
+}
+
+pkg_postinst() {
+ einfo
+ einfo "${PN} has no default configuration for safety reasons. Every"
+ einfo "mail system is different, so you should craft a set of rules"
+ einfo "that is suitable for your environment and save it to:"
+ einfo " ${EROOT}/etc/postfwd.cf"
+ einfo "You can find a sample configuration in:"
+ einfo " ${EROOT}/usr/share/doc/${PF}"
+ einfo
+ einfo "If you want ${PN} to start on system boot, you have to add it your"
+ einfo "default run level if using OpenRC:"
+ einfo " # rc-update add postfwd default"
+ einfo "Also remember to edit ${EROOT}/etc/conf.d/${PN} to your liking."
+ einfo
+ einfo "Or - if you are using systemd - enable the service:"
+ einfo " # systemctl enable postfwd"
+ einfo
+ einfo "A plugins sample folder has been placed under:"
+ einfo
+ einfo " ${EROOT}/usr/share/doc/${PF}/plugins"
+ einfo
+ einfo "You can find additional tools for testing ${PN} in:"
+ einfo " ${EROOT}/usr/share/doc/${PF}/tools"
+
+ ewarn
+ ewarn "Please read the documentation carefully and properly test new"
+ ewarn "rulesets before putting them into production use. Otherwise you"
+ ewarn "risk accidental mail loss or worse."
+ ewarn
+ ewarn "Visit https://www.postfwd.org/ for more information."
+ ewarn
+}
diff --git a/mail-filter/postfwd/postfwd-2.00.ebuild b/mail-filter/postfwd/postfwd-2.00.ebuild
new file mode 100644
index 000000000000..f4ce5c30fd15
--- /dev/null
+++ b/mail-filter/postfwd/postfwd-2.00.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils user systemd
+
+DESCRIPTION="Versatile Postfix policy server with a flexible ruleset based configuration"
+HOMEPAGE="http://www.postfwd.org/"
+SRC_URI="http://www.postfwd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+tools"
+
+DEPEND=""
+RDEPEND=">=dev-lang/perl-5.16.3
+ dev-perl/Net-CIDR-Lite
+ dev-perl/Net-DNS
+ dev-perl/Net-Server
+ dev-perl/NetAddr-IP
+ virtual/perl-Digest-MD5
+ virtual/perl-Storable
+ virtual/perl-Sys-Syslog
+ virtual/perl-Time-HiRes
+"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ enewgroup postfwd
+ enewuser postfwd -1 -1 -1 postfwd
+}
+
+src_install() {
+ local BIN="postfwd3"
+ # programs and tools
+ dosbin "${S}"/sbin/${BIN}
+
+ # man pages and documentation
+ doman "${S}"/man/man8/${BIN}.8
+ dodoc "${S}"/doc/{${BIN}.CHANGELOG,${BIN}.txt}
+
+ # example configuration(s)
+ insinto /usr/share/doc/${PF}/examples
+ newins "${S}"/etc/${PN}.cf.sample ${PN}.cf.dist
+
+ # plugins
+ dodoc -r "${S}"/plugins
+
+ # tools
+ if use tools; then
+ dodoc -r "${S}"/tools
+ fi
+
+ # start scripts script and respective configuration file
+ newinitd "${FILESDIR}"/${PN}.init.3 ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.3 ${PN}
+ systemd_newunit "${FILESDIR}"/${PN}.service.3 ${PN}.service
+}
+
+pkg_postinst() {
+ einfo
+ einfo "${PN} has no default configuration for safety reasons. Every"
+ einfo "mail system is different, so you should craft a set of rules"
+ einfo "that is suitable for your environment and save it to:"
+ einfo " /etc/postfwd.cf"
+ einfo "You can find example configurations in:"
+ einfo " /usr/share/doc/${PF}/examples"
+ einfo
+ einfo "If you want ${PN} to start on system boot, you have to add it your"
+ einfo "default run level if using OpenRC:"
+ einfo " # rc-update add postfwd default"
+ einfo "Also remember to edit /etc/conf.d/${PN} to your liking."A
+ einfo
+ einfo "Or - if you are using systemd - enable the service:"
+ einfo " # systemctl enable postfwd"
+ einfo
+ einfo "A plugins sample folder has been placed under:"
+ einfo
+ einfo " /usr/share/doc/${PF}/plugins"
+
+ if use tools; then
+ einfo
+ einfo "You can find additional tools for testing ${PN} in:"
+ einfo " /usr/share/doc/${PF}/tools"
+ fi
+
+ ewarn
+ ewarn "Please read the documentation carefully and properly test new"
+ ewarn "rulesets before putting them into production use. Otherwise you"
+ ewarn "risk accidental mail loss or worse."
+ ewarn
+ ewarn "Visit http://www.postfwd.org/ for more information."
+ ewarn
+}