summaryrefslogtreecommitdiff
path: root/mail-filter/postfwd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /mail-filter/postfwd
reinit the tree, so we can have metadata
Diffstat (limited to 'mail-filter/postfwd')
-rw-r--r--mail-filter/postfwd/Manifest8
-rw-r--r--mail-filter/postfwd/files/postfwd.conf18
-rw-r--r--mail-filter/postfwd/files/postfwd.init27
-rw-r--r--mail-filter/postfwd/files/postfwd.service11
-rw-r--r--mail-filter/postfwd/metadata.xml34
-rw-r--r--mail-filter/postfwd/postfwd-1.35-r3.ebuild87
6 files changed, 185 insertions, 0 deletions
diff --git a/mail-filter/postfwd/Manifest b/mail-filter/postfwd/Manifest
new file mode 100644
index 000000000000..f6cc616d7c2d
--- /dev/null
+++ b/mail-filter/postfwd/Manifest
@@ -0,0 +1,8 @@
+AUX postfwd.conf 429 SHA256 b1e7fcc63da3dffadd15bd6b3d8d4bb3349e896f5f99c30238134a527874bb77 SHA512 409d31933fa172af728e6fa2c3dddb1280a3fff5ea6bb9732c5e69e6266f92848553777773edf939bdf387544f9d0c1a5dd764b4c3c11aa2ceeebd5ceafc9fa5 WHIRLPOOL c112563cb435e1ac400e05ea6b556eed08e641a1c9ab561ff9365a9d19ccb3bb6b7f6f395ed19b54c6d8d1577c87a7b10fd5c7918d392af1a08475045eb6b972
+AUX postfwd.init 632 SHA256 05e4dede6b186a5168ef21712b7647c0ec7c99e3e48efc6f32407ad66900993e SHA512 132e5b44352ab6d8ca9eb565217fba77db311c3a604509407f079587e1f6147d4a4aa105348113c596f1186fbea1e1e0a7ccd7c7be9fe29bfa8404e7f08c950e WHIRLPOOL 33be0a35407bc02c430b574093f08deab2543d3cff65935242e2d26d10a9ccdf3a1b06e32e35040a6992c42893607c4eb8949c2af5ba36a93b320125db237354
+AUX postfwd.service 596 SHA256 afa9f0c69088a603f9e304b7db398c8983c7cc91251f6d8af5c3c1a8b6113ae5 SHA512 5b8e7ce6314cf61eaea13eb582b7e215209fc43bfd506fa1b1423873efb208ae5da8f8a9651358653bd91d436965f1582cc1bf226b0b44ec442869e66c0254e9 WHIRLPOOL f0cc867d3369fbda90289f9676ff4253eabbe27d5346881755826ef0c032485beb427b916751d8bdf62fd2a0aafbf3e38dc5982aad1fbaec082123be3329899d
+DIST postfwd-1.35.tar.gz 354609 SHA256 42abf8fc1229e8a09fa0141b6e23e34c6e1b654a56f6e7556d04067eafc77c41 SHA512 7b0e8c8a755f085c108c45b28ec8c32139581ce129d0b8586f1876ae87f134a4fb1606d45105ccfa62351ca2d3b87f001ea52aacab0680f3345c41562bec5207 WHIRLPOOL 7335fae813a4882441580050f5df64ef8a3da85bc5e673b9cd6662c1a08f9dd485ecafd5867da7f3370afb7c90622040d70274d70bc0e9308cfb64c24c5db214
+EBUILD postfwd-1.35-r3.ebuild 2249 SHA256 a845b2da15d253dfe009800f0b8e515e1a00c2ab2397cdc8921d282ac13d956e SHA512 1d54c65e8a5bb3ca5a7a9c0d010298c59ac9dcb840108cccf4e02afdb6d433f84cfd658415347baa7cb677f26e0f8547a7be56aa1daa394bbc80315adb114cd0 WHIRLPOOL a017e0a01ac12c03d595d5149a35ba68b179e10f6345fa9d628ca240ec5b98df67826af15802e7138ca101a94f41c7a8ccd2586d2200c146b3d26978976d17d6
+MISC ChangeLog 3871 SHA256 020991e71033795f0feccffcfcba466c78d7324a1ff38521406366535bb70aea SHA512 1acccbad406e947b6677c06f442e3597885f54f53720608ac050d7b62e6750344ac2bc3fd78fdee31682e1bf3e073a008164ce0d706f3a9ae6c482f24b03963b WHIRLPOOL 98760c2ec472019d2e75f10447e53c4de05b216c553f945ebb3379b58a717c79f8a2769a3b9b2700c1e930b9192a80c1ede89a291e9715fa3e110440febd59e2
+MISC ChangeLog-2015 1303 SHA256 5f052277c7ed56bb17cc09008863bc549c195a0dec98dff3e130e2df748e3337 SHA512 c4e67541f45704a5ca1ff8d39f3be0dbda8d63ced1d7769c21ee8aff86f18fa674c1e55bbe929bee6b0781c875d1b57d72bd7a2125e9f05167132d1687103623 WHIRLPOOL 723369e5314d613a8d0b17eb65799ebeb25d9992ca1d482c580e55a6e9011bf2fc0227e8f3899876362e78a19ff954d7dca59ad4efe81aac89d5165b70b2b396
+MISC metadata.xml 1235 SHA256 83b6c10a2a0db2935a11383721a3099c87916436a2ad383ea928ca8a56555fa3 SHA512 4da1b31359adc2fc5113ff271f14b184215bfb5744dfa993f379567ed9195087b943615d6eb51ae4473102c8de8f7e3a513ac8e4d75c00e728f7aeab676c24ea WHIRLPOOL e060cc86d6b22d04ba7369324328d9f745a0cbb251a915bf8a5981b8f85900cc5538a8d121450e47f9100f2fb6ad2016795561766ce37eed7cb126057dc7a94b
diff --git a/mail-filter/postfwd/files/postfwd.conf b/mail-filter/postfwd/files/postfwd.conf
new file mode 100644
index 000000000000..2f6f537e7c8c
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.conf
@@ -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/postfix/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 b/mail-filter/postfwd/files/postfwd.init
new file mode 100644
index 000000000000..b56d8b412f10
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.init
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# 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/postfwd2 -- --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.service b/mail-filter/postfwd/files/postfwd.service
new file mode 100644
index 000000000000..376e8d2da320
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Postfix firewall daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/postfwd2 --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --daemon --file=/etc/postfwd/postfwd.cf --interface=127.0.0.1 --port=10040 --pidfile=/var/run/postfwd.pid --user=postfwd --group=postfwd
+ExecStop=/usr/sbin/postfwd2 --file=/etc/postfwd/postfwd.cf --pidfile=/var/run/postfwd.pid --kill
+ExecReload=/usr/sbin/postfwd2 --file=/etc/postfwd/postfwd.cf --pidfile=/var/run/postfwd.pid --reload
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mail-filter/postfwd/metadata.xml b/mail-filter/postfwd/metadata.xml
new file mode 100644
index 000000000000..080f469f5bf5
--- /dev/null
+++ b/mail-filter/postfwd/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>c@roessner.co</email>
+ <name>Christian Roessner</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>info@postfwd.org</email>
+ <name>Jan Peter Kessler</name>
+ </maintainer>
+ <changelog>http://www.postfwd.org/postfwd2.CHANGELOG</changelog>
+ </upstream>
+ <longdescription lang="en">
+ postfwd (short for Postfix Firewall Daemon) is a Postfix policy server
+ that is written in Perl. It allows to define flexible and complex rules
+ to block access to the mail system before the actual message has been
+ accepted. The ruleset configuration supports features like scoring,
+ grouping, date and time based dependencies together with DNSBL lookups
+ and policy delegation (e.g. postgrey).
+ </longdescription>
+ <use>
+ <flag name="tools">Install additional tools for testing postfwd</flag>
+ </use>
+</pkgmetadata>
diff --git a/mail-filter/postfwd/postfwd-1.35-r3.ebuild b/mail-filter/postfwd/postfwd-1.35-r3.ebuild
new file mode 100644
index 000000000000..fda2d2a93fae
--- /dev/null
+++ b/mail-filter/postfwd/postfwd-1.35-r3.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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
+ virtual/perl-Sys-Syslog
+ dev-perl/Net-DNS
+ dev-perl/Net-Server
+"
+
+pkg_setup() {
+ enewgroup postfwd
+ enewuser postfwd -1 -1 -1 postfwd
+}
+
+src_install() {
+ local BIN="postfwd2"
+ # 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 ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+ systemd_dounit "${FILESDIR}"/${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/postfix/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:"
+ einfo " # rc-update add postfwd default"
+ einfo "Also remember to edit /etc/conf.d/${PN} to your liking."
+ einfo
+ einfo "A plugins sampe 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
+}