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/anomy-sanitizer
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/anomy-sanitizer')
-rw-r--r--mail-filter/anomy-sanitizer/Manifest3
-rw-r--r--mail-filter/anomy-sanitizer/anomy-sanitizer-1.76-r1.ebuild107
-rw-r--r--mail-filter/anomy-sanitizer/files/anomy.conf207
-rw-r--r--mail-filter/anomy-sanitizer/files/sample2_mailfilter.sh83
-rw-r--r--mail-filter/anomy-sanitizer/files/sample_mailfiler.sh76
-rw-r--r--mail-filter/anomy-sanitizer/metadata.xml7
6 files changed, 483 insertions, 0 deletions
diff --git a/mail-filter/anomy-sanitizer/Manifest b/mail-filter/anomy-sanitizer/Manifest
new file mode 100644
index 000000000000..8f786939b538
--- /dev/null
+++ b/mail-filter/anomy-sanitizer/Manifest
@@ -0,0 +1,3 @@
+DIST anomy-sanitizer-1.76.tar.gz 172722 SHA256 aece7173df7984a6b1b050e58e9e1aaef2393ff9a5f7b808e3176ba76a3347f4 SHA512 4ba805f733f291af71f6ec514274f27bedd132c8613ea5a96eb6bffce9ee6fed15eaf73562f69c77327174bb91e101ce36f2e24917af61efa1b88a8acb721b41 WHIRLPOOL fceeb9e69a982ea935b15577fcc871598bc9c27468860559d7274dfd2d5562776f4e627687ce558038ce06f1b0c374d950b19aa69fbdc315bebb8bd2f65cc071
+DIST sample_e-mail-architecture.png.tar 20480 SHA256 1ead0d73dac23611dc5162f0203414364b96cd1b436682f78507b9b2bef57d9d SHA512 8f2ea6fd8bda828479ad659ac5c87175eb822c7c239713103a650feac0c46ac55476b59bdf2c99ca94b23bebaa2247fc55517b31a73c96e85d9664d759b0f1e2 WHIRLPOOL 30e0254d2bbf920fca10cc3906cd9370877d175a243d8ce782bcce7036addba43412670f5cb14a7f6c7bbbb6c749f75a74aa9a3b16939631ec3036403cabce35
+DIST sample_e-mail-architektur.flw 7001 SHA256 eca14ee6bf771a824c698c47a701cef26f4f496d29b3602722bfb0164a8616f6 SHA512 7c45e3787f80a94f8dda26e9d7d980aa96ec0163fa8b6f998be9e7ea188fedceb9c7db29c7d65099da9003c36de68335a016a33ce827ca10330a7115a87d5c59 WHIRLPOOL f2260b042c99c99656a084ff77c584ed0112e3fe9955ceebcf1f43b67f06b9c8725b308f2bfcc5505a4c35b7b6c9678607c0e8a5078b3a836c93ec56177be8c7
diff --git a/mail-filter/anomy-sanitizer/anomy-sanitizer-1.76-r1.ebuild b/mail-filter/anomy-sanitizer/anomy-sanitizer-1.76-r1.ebuild
new file mode 100644
index 000000000000..950c1b71343e
--- /dev/null
+++ b/mail-filter/anomy-sanitizer/anomy-sanitizer-1.76-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils user
+
+DESCRIPTION="Perl based e-mail filtering tool, sensitive to html tags, mime types and attachments"
+HOMEPAGE="http://mailtools.anomy.net/"
+SRC_URI="
+ http://dev.gentoo.org/~jlec/distfiles/sample_e-mail-architecture.png.tar
+ http://mailtools.anomy.net/dist/${PN}-${PV}.tar.gz
+ http://dev.gentoo.org/~pacho/maintainer-needed/sample_e-mail-architektur.flw"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ >=virtual/perl-MIME-Base64-2.12-r2
+ >=dev-perl/Mail-Audit-2.1-r1
+ dev-perl/Convert-TNEF
+ dev-perl/MIME-tools
+ dev-perl/libwww-perl
+ virtual/mta"
+
+S="${WORKDIR}/anomy"
+DEST="/usr/share/${PN}"
+SANI_WORKDIR="/var/spool/sanitizer"
+SANI_CONFDIR="/etc/mail/${PN}"
+
+src_install() {
+ dodoc *.sanitizer CREDITS UNICODE.TXT
+ dohtml sanitizer.html
+ rm -rf "${S}/contrib/.tmp"
+ rm -f *.sanitizer CREDITS UNICODE.TXT sanitizer.html
+ mv "${S}/contrib" "${D}/usr/share/doc/${PF}/"
+
+ insinto /usr/share/doc/${PF}/examples
+ doins "${FILESDIR}"/*.sh "${WORKDIR}"/*.png "${DISTDIR}"/*.flw
+
+ keepdir ${SANI_CONFDIR}
+ insinto ${SANI_CONFDIR}
+ doins "${FILESDIR}"/*.conf
+
+ keepdir ${SANI_WORKDIR}
+ dodir ${DEST}
+ insinto ${DEST}
+
+# generate lists for doins
+ _list="anomy anomy/bin anomy/bin/Anomy anomy/bin/Anomy/Sanitizer anomy/testcases anomy/testcases/results.def"
+
+ for i in $_list; do
+ _di=`echo $i | sed -e "s/^anomy//g; s/^\///g"` &>/dev/null
+ insinto ${DEST}/$_di
+
+ _sublist=`find "${WORKDIR}"/$i/* -maxdepth 0 -type f`
+ for l in $_sublist; do
+ echo &>/dev/null
+ doins $l
+ done
+ done
+
+ dosym ${SANI_CONFDIR}/anomy.conf ${DEST}/anomy.conf
+}
+
+pkg_preinst() {
+ enewgroup sanitizer
+ enewuser sanitizer -1 -1 ${SANI_WORKDIR} sanitizer
+}
+
+pkg_postinst() {
+ chown -R sanitizer:sanitizer "${ROOT}"/${SANI_WORKDIR}
+ chmod -R a-rwx,g+X,u+rwX "${ROOT}"/${SANI_WORKDIR}
+ chown -R sanitizer:sanitizer "${ROOT}"/${DEST}
+ chmod -R a-rwx,g+rX,u+rX "${ROOT}"/${DEST}
+ chown sanitizer:sanitizer "${ROOT}"/${SANI_CONFDIR}/anomy.conf
+ chmod 0640 "${ROOT}"/${SANI_CONFDIR}/anomy.conf
+ chmod u+x "${ROOT}"/${DEST}/bin/*.pl
+ chmod u+x "${ROOT}"/${DEST}/testcases/*.sh
+ chmod u+w "${ROOT}"/${DEST}/*
+ chmod u+w "${ROOT}"/${DEST}/bin
+ chmod u+w "${ROOT}"/${DEST}/bin/Anomy
+ chmod u+w "${ROOT}"/${DEST}/bin/Anomy/Sanitizer
+ chmod u+w "${ROOT}"/${DEST}/testcases
+ chmod u+w "${ROOT}"/${DEST}/testcases/results.def
+
+ elog ""
+ elog "There is a howto for the integration of sanitizer"
+ elog "into your (postfix) mail system at"
+ elog "http://advosys.ca/papers/postfix-filtering.html"
+ elog "Please find example scripts to be used to integrate sanitizer"
+ elog "into your (postfix) mail system at"
+ elog "/usr/share/doc/${PF}/examples"
+ elog "There is also a png and kivio document about a possible"
+ elog "e-mail architecture"
+ elog ""
+
+}
+
+pkg_postrm() {
+ elog "After unmerging this ebuild, you will have to remove"
+ elog "created user and group manually. To do so, run:"
+ elog "userdel -r sanitizer; groupdel sanitizer"
+}
diff --git a/mail-filter/anomy-sanitizer/files/anomy.conf b/mail-filter/anomy-sanitizer/files/anomy.conf
new file mode 100644
index 000000000000..f7c45cd973d2
--- /dev/null
+++ b/mail-filter/anomy-sanitizer/files/anomy.conf
@@ -0,0 +1,207 @@
+# Example configuration file for Anomy Sanitizer
+#
+# Thiemo Kellner, thiemo@thiam.ch, 2003-05-29
+# Based on http://advosys.ca/papers/postfix-filtering.html,
+# Advosys Consulting Inc., Ottawa
+#
+# Works with Anomy Sanitizer revision 1.60
+
+
+ # Warn user about unscanned parts, etc.
+ feat_verbose = 1
+
+ # Inline logs: 0 = Off, 1 = Maybe, 2 = Force
+ feat_log_inline = 1
+
+ # Print log to standard error: 0 = Off, 1 = On
+ feat_log_stderr = 1
+
+ # Don't use XML format for logs.
+ feat_log_xml = 0
+
+ # Omit trace info from logs.
+ feat_log_trace = 0
+
+ # Don't add any scratch space to part headers.
+ feat_log_after = 0
+
+ # Enable filename-based policy decisions.
+ feat_files = 1
+
+ # Force all parts (except text/plain and
+ # text/html parts) to have file names: 0 = Off, 1 = On
+ feat_force_name = 1
+
+ # Replace all boundary strings with our own
+ # NOTE: Always breaks PGP/MIME messages!
+ feat_boundaries = 0
+
+ # Protect against buffer overflows and null values.
+ feat_lengths = 1
+
+ # Defang incoming shell scripts.
+ feat_scripts = 1
+
+ # Defang active HTML content.
+ feat_html = 1
+
+ # Web-bugs are allowed.
+ feat_webbugs = 0
+
+ # Don't scan PGP signed message parts: 0 = Don't scan (???)
+ feat_trust_pgp = 0
+ msg_pgp_warning = WARNING: Unsanitized content follows.\n
+
+ # Sanitize inline uuencoded files.
+ feat_uuencoded = 1
+
+ # Sanitize forwarded messages
+ feat_forwards = 1
+
+ # Set to 0 if going productive (This isn't a test-case configuration.)
+ feat_testing = 1
+
+ # Fix invalid MIME, if possible.
+ feat_fixmime = 1
+
+ # Don't be excessively paranoid about MIME headers etc.
+ feat_paranoid = 0
+
+ # Advertisement to insert in each mail header:
+ header_info = X-Sanitizer: Anomy Sanitizer mail filter
+ header_url = 0
+ header_rev = 0
+
+
+ #
+ # Scoring
+ #
+
+ # Any message requring this many modifications
+ # will cause the sanitizer to return a non-zero
+ # exit code after processing the entire message.
+ # To disable set to 0.
+ score_bad = 100
+ #score_panic = 0
+
+ msg_file_drop = \n*****\n
+ msg_file_drop += NOTE: An attachment named %FILENAME was deleted from
+ msg_file_drop += this message because it contained a (windows) executable
+ msg_file_drop += or other potentially dangerous file type.
+ msg_file_drop += If you really need this attachment, have it re-sent
+ msg_file_drop += encapsulated, e.g. in a zip or tgz archive or contact your
+ msg_file_drop += mail system administrator.
+
+ #
+ # You may need to increase the following if you have a very
+ # complex configuration split between multiple files.
+ #
+ # Thiemo Kellner, thiemo@thiam.ch, 2003-05-31
+ # max_conf_recursions does not work with 1.60
+ #max_conf_recursions = 5 # The default is 5.
+ #
+ # Create temporary or saved files using this template.
+ # An attachment named "dude.txt" might be saved as
+ #
+ # /var/quarantine/att-dude-txt.A9Y
+ #
+ # Note: The directory must exist and be writable by
+ # the user running the sanitizer.
+ # (supposedly: $F -> file name, $$$ -> three arbitrary characters)
+ file_name_tpl = /var/spool/sanitizer/att-$F.$$$
+
+ # We have three policies, in addition to the default which is
+ # to defang file names.
+ #
+ file_list_rules = 3
+ file_default_policy = defang
+ file_default_filename = unnamed.file
+
+ # Delete obviously executable attachments. This list is
+ # incomplete! This is a perl regular expression, see "man
+ # perlre" for info. The (?i) prefix makes the regexp case
+ # insensitive.
+ #
+ file_list_1 = (?i)(winmail.dat)|
+ file_list_1 += (\.(exe|com|vb[se]|dll|ocx|cmd|bat|pif|lnk|hlp|ms[ip]|reg|sct
+ file_list_1 += |inf|asd|cab|sh[sb]|scr|cpl|chm|ws[fhc]|hta|vcd|vcf|eml|nws))$
+ file_list_1_policy = drop
+ file_list_1_scanner = 0
+
+ # Scan WinWord and Excel attachments with built-in macro scanner.
+ # We consider anything exceeding the score of 25 to be dangerous,
+ # and save it in the quarantine.
+ #
+ file_list_2 = (?i)\.(doc|dot|xls|xlw)$
+ file_list_2_policy = accept:accept:save:save
+ file_list_2_scanner = 0:1:2:builtin/macro 25# Do not log to STDERR:
+
+ # Allow file types considered "safe" (DO NOT JUST TRUST THIS LIST!)
+ file_list_3 = (?i)\.(
+ # Plain ASCII formats:
+ file_list_3 += txt|rtf|csv|dxf|htm|[sp]?html?|xml|xslt?|dtd|css|sgml
+ # PostScript (like) formats:
+ file_list_3 += |pdf|e?ps
+ # Word processor and document formats:
+ file_list_3 += |doc|dot|kwd|stw
+ # Spreadsheets:
+ file_list_3 += |xls|xlw|xlt|wk[1-4]|stc|ksp|gnumeric
+ # Presentation applications:
+ file_list_3 += |ppt|pps|pot|kpr|chrt
+ # Type setting formats:
+ file_list_3 += |dvi|texi?|tfm|txi|texinfo
+ # Flow charting:
+ file_list_3 += |flw
+ # Bitmap graphic files (maybe some are actually vector graphic formats):
+ file_list_3 += |jpe?g|gif|png|tiff?|bmp|psd|pcx|xcf|pat|pix|pnm|sgi|snp|ras|tga
+ file_list_3 += |xwd|xpm|dib|rle|cal|cas|pat|bmf|cel|cex|cgm|ico|img|jfi|jif|raw
+ file_list_3 += |crw|sun
+ # Vector graphics and diagramming:
+ file_list_3 += |vsd|drw|cdr|swf|pct|pict|kpm|kon
+ # Multimedia:
+ file_list_3 += |mp[23]|avi|mpe?g|mov|ram?|midi?|ogg|aiff?|au|snd|wav
+ # Archives:
+ file_list_3 += |zip|g?z|rar|tgz|t?bz2|tar|sit|sea|arc
+ # Package formats:
+ file_list_3 += |rpm|deb
+ # Others:
+ file_list_3 += |kfo
+ # Source code:
+ file_list_3 += |[ch](pp|\+\+)?|s|inc|asm|patch|java|php\d?|jsp|bas|ebuild)
+ file_list_3_policy = accept
+ file_list_3_scanner = 0
+
+ # Any file type not listed above gets renamed to prevent
+ # the mail client from auto-executing it.
+
+ #
+ # More sample file lists
+ #
+ # Scan mp3 files for Evil Viruses, using the imaginary mp3virscan
+ # utility. Always define FOUR potential policies, which depend on the
+ # exit code returned by the scanner. Which code means what is
+ # defined in the scanner line, which must contain THREE entries.
+ # The fourth policy is used for "anything else".
+ #
+ # "accept" if the file is clean (exit status 0 or 1)
+ # "mangle" if the file was dirty, but is now clean (2 or 4)
+ # "drop" if the file is still dirty (66)
+ # "save" if the mp3virscan utility returns some other exit code
+ # or an error occurs.
+ #
+ #file_list_4 = (?i)\.(mp3|mp2|mpg)$
+ #file_list_4_policy = accept:mangle:drop:save
+ #file_list_4_scanner = 0,1:2,4:66:/path/to/mp3virscan -opt -f %FILENAME
+
+ # Archives and scriptable stuff - virus scan these.
+ # NOTE: There must be THREE groups of exit codes and FOUR policies,
+ # - the first three match the code groups, the fourth is default.
+ #
+ #file_list_5_scanner = 0:5:3,4:/usr/local/bin/avp.sh %FILENAME
+ #file_list_5_policy = accept:accept:save:save
+ #file_list_5 = (?i)\.(xls|d(at|oc)|p(pt|l)|rtf|[sp]?html?
+ #file_list_5 += |class|upd|wp\d?|m?db
+ #file_list_5 += |z(ip|oo)|ar[cj]|lha|[tr]ar|rpm|deb|slp|tgz
+ #file_list_5 += )(\.g?z|\.bz\d?)*$
+
+
diff --git a/mail-filter/anomy-sanitizer/files/sample2_mailfilter.sh b/mail-filter/anomy-sanitizer/files/sample2_mailfilter.sh
new file mode 100644
index 000000000000..3448d0ac0ea2
--- /dev/null
+++ b/mail-filter/anomy-sanitizer/files/sample2_mailfilter.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# spamassassin
+#
+# Simple filter to plug SpamAssassin only
+# into the Postfix MTA, using the spamc / spamd
+# daemon version of SpamAssassin.
+#
+# (Should result in higher performance on busy servers)
+#
+# NOTE: spamd must be running before using this script!
+#
+# For use with:
+# Postfix 20010228 or later
+# SpamAssassin 2.42 or later
+#
+############
+# #
+# UNTESTED #
+# #
+############
+
+
+# VARIABLES
+# ---------
+
+# File locations
+# (CHANGE AS REQUIRED TO MATCH YOUR SET-UP)
+INSPECT_DIR="/var/spool/sanitizer"
+#INSPECT_DIR="/var/spool/filter"
+SENDMAIL="/usr/lib/sendmail -i"
+ANOMY="/usr/share/anomy-sanitizer"
+ANOMY_BIN="${ANOMY}/bin/sanitizer.pl"
+ANOMY_CONF="/usr/share/anomy-sanitizer/anomy.conf"
+#ANOMY_LOG="/dev/null"
+ANOMY_LOG="/tmp/sanitizer.log"
+SPAMASSASSIN="/usr/bin/spamassassin"
+#SPAMASSASSIN_LOG="/dev/null"
+SPAMASSASSIN_LOG="/tmp/spamassassin.log"
+CAT="/bin/cat"
+
+# Messages
+UNABLE_TO_CD_INSPECTDIR="Impossible to change to ${INSPECT_DIR}"
+MSG_CONTENT_REJECTED="Message content rejected"
+
+# Exit codes from <sysexits.h>
+EX_TEMPFAIL=75
+EX_UNAVAILABLE=69
+
+# Users that execute different filters
+SPAMC_USER="sanitizer"
+
+export ANOMY
+
+
+# MAIN
+# ----
+
+cd ${INSPECT_DIR} || { echo ${UNABLE_TO_CD_INSPECTDIR} ; exit ${EX_TEMPFAIL}; }
+
+# Clean up when done or when aborting.
+trap "rm -f out.$$" 0 1 2 3 15
+
+# sanitizer only
+#${CAT} \
+# | ${ANOMY_BIN} ${ANOMY_CONF} 2>>${ANOMY_LOG} > out.$$ || \
+# { echo ${MSG_CONTENT_REJECTED}; exit ${EX_UNAVAILABLE}; }
+
+# sanitizer and SpamAssassin
+${CAT} \
+ | ${SPAMC} -f -u ${SPAMC_USER} 2>${SPAMASSASSIN_LOG} \
+ | ${ANOMY_BIN} ${ANOMY_CONF} 2>>${ANOMY_LOG} > out.$$ || \
+ { echo ${MSG_CONTENT_REJECTED}; exit ${EX_UNAVAILABLE}; }
+
+# SpamAssassin only
+#${CAT} \
+# | ${SPAMC} -f -u ${SPAMC_USER} 2>${SPAMASSASSIN_LOG} > out.$$ || \
+# { echo ${MSG_CONTENT_REJECTED}; exit ${EX_UNAVAILABLE}; }
+
+$SENDMAIL "$@" < out.$$
+
+exit 0
+
diff --git a/mail-filter/anomy-sanitizer/files/sample_mailfiler.sh b/mail-filter/anomy-sanitizer/files/sample_mailfiler.sh
new file mode 100644
index 000000000000..a258f4890ded
--- /dev/null
+++ b/mail-filter/anomy-sanitizer/files/sample_mailfiler.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+#
+# spamc.sh
+#
+# Simple filter to plug SpamAssassin only
+# into the Postfix MTA, using the spamc / spamd
+# daemon version of SpamAssassin.
+#
+# (Should result in higher performance on busy servers)
+#
+# NOTE: spamd must be running before using this script!
+#
+# For use with:
+# Postfix 20010228 or later
+# SpamAssassin 2.42 or later
+#
+
+
+# VARIABLES
+# ---------
+
+# File locations
+# (CHANGE AS REQUIRED TO MATCH YOUR SET-UP)
+INSPECT_DIR="/var/spool/sanitizer"
+#INSPECT_DIR="/var/spool/filter"
+SENDMAIL="/usr/lib/sendmail -i"
+ANOMY="/usr/share/anomy-sanitizer"
+ANOMY_BIN="${ANOMY}/bin/sanitizer.pl"
+ANOMY_CONF="/usr/share/anomy-sanitizer/anomy.conf"
+#ANOMY_LOG="/dev/null"
+ANOMY_LOG="/tmp/sanitizer.log"
+SPAMC="/usr/bin/spamc"
+#SPAMC_LOG="/dev/null"
+SPAMC_LOG="/tmp/spamc.log"
+CAT="/bin/cat"
+
+# Messages
+UNABLE_TO_CD_INSPECTDIR="Impossible to change to ${INSPECT_DIR}"
+MSG_CONTENT_REJECTED="Message content rejected"
+
+# Exit codes from <sysexits.h>
+EX_TEMPFAIL=75
+EX_UNAVAILABLE=69
+
+# Users that execute different filters
+SPAMC_USER="sanitizer"
+
+export ANOMY
+
+
+# MAIN
+# ----
+
+cd ${INSPECT_DIR} || { echo ${UNABLE_TO_CD_INSPECTDIR} ; exit ${EX_TEMPFAIL}; }
+
+# sanitizer only
+#${CAT} \
+# | ${ANOMY_BIN} ${ANOMY_CONF} 2>>${ANOMY_LOG} \
+# | ${SENDMAIL} "$@" || \
+# { echo ${MSG_CONTENT_REJECTED}; exit ${EX_UNAVAILABLE}; }
+
+# sanitizer and SpamAssassin
+${CAT} \
+ | ${SPAMC} -f -u ${SPAMC_USER} 2>${SPAMC_LOG} \
+ | ${ANOMY_BIN} ${ANOMY_CONF} 2>>${ANOMY_LOG} \
+ | ${SENDMAIL} "$@" || \
+ { echo ${MSG_CONTENT_REJECTED}; exit ${EX_UNAVAILABLE}; }
+
+# SpamAssassin only
+#${CAT} \
+# | ${SPAMC} -f -u ${SPAMC_USER} 2>${SPAMC_LOG} \
+# | ${SENDMAIL} "$@" || \
+# { echo ${MSG_CONTENT_REJECTED}; exit ${EX_UNAVAILABLE}; }
+
+exit 0
+
diff --git a/mail-filter/anomy-sanitizer/metadata.xml b/mail-filter/anomy-sanitizer/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/mail-filter/anomy-sanitizer/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>