From 8ffd57b3fe8fb56d77dde340af147255ce73ad1c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 18 Oct 2004 22:54:51 +0000 Subject: Added sample scripts. --- scripts/spamassassin.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/spamassassin.sh (limited to 'scripts/spamassassin.sh') diff --git a/scripts/spamassassin.sh b/scripts/spamassassin.sh new file mode 100644 index 0000000..4a6e8fe --- /dev/null +++ b/scripts/spamassassin.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +################################################################################ +# PROXSMTP SAMPLE SCRIPT +# +# These sample scripts are to give you an idea of how to use proxsmtp +# filtering. They are NOT intended for use on production servers. +# +# A simple proxsmtp script which sends email through spamassassin. +# +# Make sure the option 'FilterType' is set as follows: +# FilterType: pipe +# +# See proxsmtpd.conf(5) for configuration details +# + +# Pipe mail through this command +spamassassin -e + +# Now check return value +if [ $? -ne 0 ]; then + + # The last line of output to stderr will be used + # as an error message when the filter fails + echo "550 Content Rejected: We don't like spam" >&2 + + # Cause the filter to fail, email will be rejected + exit 1 +fi + +# Filter success +exit 0 -- cgit v1.2.3