summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2014-07-15 00:19:49 +0000
committerMarc Schiffbauer <mschiff@gentoo.org>2014-07-15 00:19:49 +0000
commit645bdb72dd4cc9e4880207ce39fbb70c625663ab (patch)
treec5cf0c9f01f63df622ee6a60f6979d05f8386ebb /mail-filter/postfwd
parentAdded postfwd to the tree (again?). (diff)
downloadhistorical-645bdb72dd4cc9e4880207ce39fbb70c625663ab.tar.gz
historical-645bdb72dd4cc9e4880207ce39fbb70c625663ab.tar.bz2
historical-645bdb72dd4cc9e4880207ce39fbb70c625663ab.zip
Added postfwd to the tree (again?).
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0x296C6CCA35A64134
Diffstat (limited to 'mail-filter/postfwd')
-rw-r--r--mail-filter/postfwd/Manifest15
-rw-r--r--mail-filter/postfwd/files/postfwd.conf18
-rw-r--r--mail-filter/postfwd/files/postfwd.init28
-rw-r--r--mail-filter/postfwd/files/postfwd2.example.cf154
-rw-r--r--mail-filter/postfwd/metadata.xml33
-rw-r--r--mail-filter/postfwd/postfwd-1.35.ebuild88
6 files changed, 334 insertions, 2 deletions
diff --git a/mail-filter/postfwd/Manifest b/mail-filter/postfwd/Manifest
index fda7b3cdde4a..89cbd6999cc1 100644
--- a/mail-filter/postfwd/Manifest
+++ b/mail-filter/postfwd/Manifest
@@ -1,6 +1,17 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX postfwd.conf 429 SHA256 b1e7fcc63da3dffadd15bd6b3d8d4bb3349e896f5f99c30238134a527874bb77 SHA512 409d31933fa172af728e6fa2c3dddb1280a3fff5ea6bb9732c5e69e6266f92848553777773edf939bdf387544f9d0c1a5dd764b4c3c11aa2ceeebd5ceafc9fa5 WHIRLPOOL c112563cb435e1ac400e05ea6b556eed08e641a1c9ab561ff9365a9d19ccb3bb6b7f6f395ed19b54c6d8d1577c87a7b10fd5c7918d392af1a08475045eb6b972
-AUX postfwd.init 642 SHA256 303d36d1fbc67a89556624ea926e2447d84ee667ee2c8aa3815241862657a693 SHA512 c2b9580d6937701f44ed442f5113ffcb5e0feb358155b4428448019f7f6fb4cdb93156b953a5237636485afef887940e59099bf2cfed9658ddaaac4e4fd01ca2 WHIRLPOOL e377aead5d7fa22861c4faffa3efb96c341362afd1632b9e5b75d64c786222372307c8f7a7739203ae3f469191cf4e92a2465983757a75189d628eb977ee6506
+AUX postfwd.init 743 SHA256 58b056ffb09f3e3985a78d2fe67ddeb2d8ac984400f3fd7617d096a80f9f9ada SHA512 d35ed9c6a7d91e0d07ec123ef6f5a11535036d9b91b3df9cb34a25a239ddc131ae3f1412d3bb8fd55ae39a8ce0bcc05dcdfd21db9c2ecfd845eb57c501d22b58 WHIRLPOOL 32fb1478e8b858738e8949241d71d50b1dd6d2971e58ca5e2d48295b4477916ee19c5a92d9ab38b174d6c78b710c085f05c88d628ecabc48852313a7f36723bf
AUX postfwd2.example.cf 5276 SHA256 19108c479fa7c11aa625388189c534b32867c707bdbfcb092a496a01c9331039 SHA512 99e2d93b67b480b58311671ff79ee083c045e6e876ac4c9934b3a68075cdc0b891a2d185e07f90fe269286b813d1b3b63f08612fa04b86133daae70ee9ae2432 WHIRLPOOL 2ee1c4830b033bc6639d9d230e267b5a42adc3d3249baf1fffccfed4aa3ac4de33b6db9f3c319421cb746f9f3834a3e468e3a1dafcd4fb13ec780e7b3e044860
DIST postfwd-1.35.tar.gz 354609 SHA256 42abf8fc1229e8a09fa0141b6e23e34c6e1b654a56f6e7556d04067eafc77c41 SHA512 7b0e8c8a755f085c108c45b28ec8c32139581ce129d0b8586f1876ae87f134a4fb1606d45105ccfa62351ca2d3b87f001ea52aacab0680f3345c41562bec5207 WHIRLPOOL 7335fae813a4882441580050f5df64ef8a3da85bc5e673b9cd6662c1a08f9dd485ecafd5867da7f3370afb7c90622040d70274d70bc0e9308cfb64c24c5db214
-EBUILD postfwd-1.35.ebuild 2264 SHA256 c0245de1f7b1d204dc7a19379f952efc5f9724413a3365c08c8f4e682e7b6501 SHA512 bf9b869a3942c6e3e9a840fb6b9530a72d578ddbd3657fd70360265085cb427aeb0549555e3a8d79971630272890b7ee44bb66f6bde4c34c59e4a23d4ca255ac WHIRLPOOL 386aa037898e597d75681f4b9b6495c76ed655bc230a3baff93f8a723fe4ff1440bb4e17d5a007ae01e450180e240b636cfc865e93d1a9a3814df758c95d7002
+EBUILD postfwd-1.35.ebuild 2366 SHA256 3253883d9652d616aea7a67e29c4a2e69f959857357b2256d81bb60a820ad8de SHA512 896da544af97068fb6245bb9700c709b7922a6afae2704603809a7334158417afdee756ddea5b38f6672e718437b01a96106de26e7e7a11dd8dc8f1c0df4b858 WHIRLPOOL a177ab0ef898942d64f6a77c7f0f9906594b70a0750c0a38ff617e1908d482f8e61bf02daa07c0bd1cbe57cfa026bbfc47ea22f063c9c8028bae3a397206bd6d
+MISC ChangeLog 443 SHA256 64bd37d8e35db2d036aa462ac81eb2bf9566841d910f3ef6ee241f366f21d70b SHA512 7fb1c3b94b814a87675308b8f1b57143e104f4e98af3aab72c8fafe92e48168aa2152774313d76f371c2b92dedcf1b6d842a29609fb944c10555426afc35bf22 WHIRLPOOL 95c35136070216e82f43366b478e5462c298c917eab569fbab020066c6a58b19df885a3933de35729589d3dcd46ddbb73b4e50061a27693c81a12a0140999684
MISC metadata.xml 1235 SHA256 f9a97a33d34ef080def49fc04043dce33c363f401536f3828e9e27d27b8dc7c0 SHA512 be0909b4e6289c64063deebf1ec6cb606a2f3ad9d44e20257f6b94f437134ce869a4b58a5cd721428052058092acf142688c722a1bbbae71d7b63f09670af213 WHIRLPOOL 6f16db0dec7940f587de7c1c7a7c03bfc8dceba50a7d6cd4ba160e3b75f4e39ec852de16d72c5dbe73a16149fd56589c9cd03a6222e996102c1ce235e99325fc
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iD8DBQFTxHOiKWxsyjWmQTQRCMZzAJ91f7hQdplCWpyhJ3M9RtoAyyRs8ACfVpv8
+RlCZZ33AitMK867DyGGm/KY=
+=vgPN
+-----END PGP SIGNATURE-----
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..5f932b96fc88
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.init
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/postfwd/files/postfwd.init,v 1.1 2014/07/15 00:19:41 mschiff Exp $
+
+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/postfwd2.example.cf b/mail-filter/postfwd/files/postfwd2.example.cf
new file mode 100644
index 000000000000..614f6331527a
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd2.example.cf
@@ -0,0 +1,154 @@
+# source:
+# http://hege.li/howto/spam/etc/postfwd/postfwd.conf
+#
+# This version was included on 29 Mar 2010. Newer versions
+# may be available.
+
+###
+### Example config for postfwd 1.10pre8+
+###
+
+## Check DNS Whitelisting
+
+id=OK_DNSWL; \
+ rbl=list.dnswl.org/^127/43200; \
+ action=OK
+
+## Check HELO and reverse DNS
+
+id=SET_HELO; \
+ helo_name=^(\[|[^.]+$|.*?[0-9.-]{8}); \
+ action=set(HIT_helo=1)
+
+id=SET_NODNS; \
+ client_name=^unknown$; \
+ action=set(HIT_nodns=1)
+
+id=REJECT_HELO_NODNS; \
+ HIT_helo==1; HIT_nodns==1; \
+ action=REJECT Blocked - contact postmaster@example.net for help - Suspicious HELO [$$helo_name] and missing reverse DNS [$$client_address]
+
+## Check ZEN first for immediate blocking - less queries for other lists
+## See usage policy: http://www.spamhaus.org/organization/dnsblusage.html
+
+id=REJECT_RBL_ZEN; \
+ rbl=zen.spamhaus.org; \
+ action=REJECT Blocked - contact postmaster@example.net for help - DNSBL [$$dnsbltext]
+
+## Check other DNSBLs in parallel
+
+&&DNSBLS { \
+ rbl=bl.spamcop.net; \
+ rbl=b.barracudacentral.org; \
+ rbl=bl.spameatingmonkey.net; \
+ rbl=dnsbl-1.uceprotect.net; \
+ rbl=psbl.surriel.com; \
+ rbl=combined.njabl.org; \
+ rbl=dnsbl.sorbs.net; \
+ rbl=ix.dnsbl.manitu.net; \
+};
+
+id=EVAL_DNSBLS; \
+ &&DNSBLS; rblcount=all; \
+ action=set(HIT_rbls=$$rblcount,HIT_dtxt=$$dnsbltext)
+
+id=REJECT_RBL_MULTI; \
+ HIT_rbls>=2; \
+ action=REJECT Blocked - contact postmaster@example.net for help - Multiple DNSBLs [$$HIT_dtxt]
+
+## Check RHSBLs if there wasn't enough DNSBLs hit
+
+&&RHSBLS_REVERSE { \
+ rhsbl_reverse_client=dynamic.rhs.mailpolice.com; \
+};
+
+&&RHSBLS_SENDER { \
+ rhsbl_sender=dbl.spamhaus.org; \
+ rhsbl_sender=multi.uribl.com; \
+ rhsbl_sender=multi.surbl.org; \
+ rhsbl_sender=rhsbl.ahbl.org; \
+ rhsbl_sender=rhsbl.sorbs.net; \
+ rhsbl_sender=dsn.rfc-ignorant.org; \
+};
+
+id=EVAL_RHSBLS; \
+ &&RHSBLS_REVERSE; &&RHSBLS_SENDER; rhsblcount=all; \
+ action=set(HIT_rhsbls=$$rhsblcount,HIT_rtxt=$$dnsbltext)
+
+id=REJECT_RHSBL_MULTI; \
+ HIT_rhsbls>=2; \
+ action=REJECT Blocked - contact postmaster@example.net for help - Multiple RHSBLs [$$HIT_rtxt]
+
+## See if we get any combined hits from rules before
+
+id=REJECT_RBL_RHSBL; \
+ HIT_rbls>=1; HIT_rhsbls>=1; \
+ action=REJECT Blocked - contact postmaster@example.net for help - RHSBL and DNSBL [$$HIT_rtxt] [$$HIT_dtxt]
+
+id=REJECT_RBL_HELO; \
+ HIT_rbls>=1; HIT_helo==1; \
+ action=REJECT Blocked - contact postmaster@example.net for help - DNSBL [$$HIT_dtxt] and suspicious HELO [$$helo_name]
+
+id=REJECT_RBL_NODNS; \
+ HIT_rbls>=1; HIT_nodns==1; \
+ action=REJECT Blocked - contact postmaster@example.net for help - DNSBL [$$HIT_dtxt] and missing reverse DNS [$$client_address]
+
+id=REJECT_RHSBL_HELO; \
+ HIT_rhsbls>=1; HIT_helo==1; \
+ action=REJECT Blocked - contact postmaster@example.net for help - RHSBL [$$HIT_rtxt] and suspicious HELO [$$helo_name]
+
+id=REJECT_RHSBL_NODNS; \
+ HIT_rhsbls>=1; HIT_nodns==1; \
+ action=REJECT Blocked - contact postmaster@example.net for help - RHSBL [$$HIT_rtxt] and missing reverse DNS [$$client_address]
+
+## Finally greylist all lesser hits.
+##
+## A more DNSBL friendly way would be to greylist everything suspicious
+## before DNS checks. Currently this requires you to setup some postfix
+## tables before postfwd is called, since greylisting can be only done last
+## in postfwd (action always exits processing).
+
+id=GREY_HELO; HIT_helo==1; action=check_postgrey
+id=GREY_NODNS; HIT_nodns==1; action=check_postgrey
+id=GREY_RBL; HIT_rbls>=1; action=check_postgrey
+id=GREY_RHSBL; HIT_rhsbls>=1; action=check_postgrey
+
+&&DNSBLS_GREY { \
+ rbl=dnsbl-2.uceprotect.net; \
+ rbl=dnsbl-3.uceprotect.net; \
+};
+
+id=GREY_DNSBL; &&DNSBLS_GREY; action=check_postgrey
+
+
+
+##
+## This example is free to use as per BSD license:
+##
+## Copyright (c) 2008, Henrik Krohns <hege@hege.li>
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without modification,
+## are permitted provided that the following conditions are met:
+##
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of the authors nor the names of his contributors
+## may be used to endorse or promote products derived from this
+## software without specific prior written permission.
+##
+## THIS SOFTWARE IS PROVIDED BY ME ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+## FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT,
+## INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+## POSSIBILITY OF SUCH DAMAGE.
+##
+
diff --git a/mail-filter/postfwd/metadata.xml b/mail-filter/postfwd/metadata.xml
new file mode 100644
index 000000000000..2c1355607637
--- /dev/null
+++ b/mail-filter/postfwd/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ <description>Proxy-Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>cr@sys4.de</email>
+ <name>Christian Roessner</name>
+ <description>Proxy-Maintainer. Assign bugs to him</description>
+ </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.ebuild b/mail-filter/postfwd/postfwd-1.35.ebuild
new file mode 100644
index 000000000000..9d2bf16b8e4d
--- /dev/null
+++ b/mail-filter/postfwd/postfwd-1.35.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/postfwd/postfwd-1.35.ebuild,v 1.1 2014/07/15 00:19:41 mschiff Exp $
+
+EAPI=4
+
+inherit eutils user
+
+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/postfwd.cf.sample ${BIN}.cf.dist
+ newins "${FILESDIR}"/${BIN}.example.cf ${BIN}.cf.realworld
+
+ # plugins
+ dodoc -r "${S}"/plugins
+
+ # tools
+ if use tools; then
+ dodoc -r "${S}"/tools
+ fi
+
+ # init script and respective configuration file
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+}
+
+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
+}