freebsd-ports/mail/noattach/files/noattach.sh
Dirk Meyer a8b5fc19bb Add-Port:
A attatchment filter for Sendmail

There really isn't much to say, noattach is a milter that parses the body
of email messages from sendmail and checks if the filename of attachments
matches one of the regular expressions in a given pattern file and rejects
those emails that match.
Filenames are MIME decoded if needed.

This program needs sendmail version 8.12.1 or newer to be compiled with
libsm and libmilter.

WWW: http://freshmeat.net/projects/noattach/
2002-02-10 06:04:46 +00:00

23 lines
334 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
if ! test -x %%PREFIX%%/libexec/noattach
then
exit 0
fi
case $1 in
start)
rm -f /var/run/noattach.pid
%%PREFIX%%/libexec/noattach -p local:/var/run/noattach &&
echo -n ' noattach'
;;
stop)
killall noattach
rm -f /var/run/noattach.pid
;;
*)
echo "Usage: $0: [ start | stop ]" 2>&1
exit 65
;;
esac