summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-filter/postfwd/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'mail-filter/postfwd/files')
-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
3 files changed, 200 insertions, 0 deletions
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..df96edb87d45
--- /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
+# $Id$
+
+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.
+##
+