1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

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/
This commit is contained in:
Dirk Meyer 2002-02-10 06:04:46 +00:00
parent d4c869e236
commit a8b5fc19bb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54469
7 changed files with 102 additions and 0 deletions

View File

@ -120,6 +120,7 @@
SUBDIR += nbsmtp
SUBDIR += newmail
SUBDIR += nmh
SUBDIR += noattach
SUBDIR += nullmailer
SUBDIR += p5-Email-Find
SUBDIR += p5-Email-Valid

52
mail/noattach/Makefile Normal file
View File

@ -0,0 +1,52 @@
# New ports collection makefile for: noattach
# Date created: 10. Feb 2002
# Whom: dirk.meyer@dinoex.sub.org
#
# $FreeBSD$
#
PORTNAME= noattach
PORTVERSION= 1.0beta7
CATEGORIES= mail
MASTER_SITES= ftp://ftp.rhnet.is/pub/noattach/
MAINTAINER= dinoex@FreeBSD.org
BUILD_DEPENDS= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
CTARGETS+= rays-filter
CFLAGS+= -Wall -I$(LOCALBASE)/include ${PTHREAD_CFLAGS:S=""==}
FLAGS+= ${PTHREAD_LIBS}
LDFLAGS+= -L$(LOCALBASE)/lib
GNU_CONFIGURE= yes
DOCSFILES= AUTHORS COPYING INSTALL NEWS README ChangeLog
SAMPLEFILES= README noattach.patterns noattach.patterns.johncon
.include <bsd.port.pre.mk>
.if defined(SENDMAIL_WITHOUT_MILTER)
pre-fetch:
@${ECHO_MSG}
@${ECHO_MSG} You must unset variable SENDMAIL_WITHOUT_MILTER,
@${ECHO_MSG} and rebuild sendmail in the ports
@${FALSE}
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/noattach ${PREFIX}/libexec/noattach
${INSTALL_SCRIPT} ${FILESDIR}/noattach.sh \
${PREFIX}/etc/rc.d/noattach.sh.sample
${INSTALL_DATA} ${WRKSRC}/examples/noattach.patterns \
${PREFIX}/etc/noattach.patterns-dist
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${MKDIR} ${EXAMPLESDIR}
.for i in ${DOCSFILES}
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/
.endfor
.for i in ${SAMPLEFILES}
${INSTALL_DATA} ${WRKSRC}/examples/${i} ${EXAMPLESDIR}/
.endfor
.endif
.include <bsd.port.post.mk>

1
mail/noattach/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (noattach-1.0beta7.tar.gz) = 694cc2c602a3a161af096f766142ef2b

View File

@ -0,0 +1,23 @@
#!/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

View File

@ -0,0 +1 @@
A attatchment filter for Sendmail

10
mail/noattach/pkg-descr Normal file
View File

@ -0,0 +1,10 @@
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/

14
mail/noattach/pkg-plist Normal file
View File

@ -0,0 +1,14 @@
libexec/noattach
etc/rc.d/noattach.sh.sample
etc/noattach.patterns-dist
%%PORTDOCS%%share/doc/noattach/AUTHORS
%%PORTDOCS%%share/doc/noattach/COPYING
%%PORTDOCS%%share/doc/noattach/INSTALL
%%PORTDOCS%%share/doc/noattach/NEWS
%%PORTDOCS%%share/doc/noattach/README
%%PORTDOCS%%share/doc/noattach/ChangeLog
%%PORTDOCS%%@dirrm share/doc/noattach
%%PORTDOCS%%share/examples/noattach/README
%%PORTDOCS%%share/examples/noattach/noattach.patterns
%%PORTDOCS%%share/examples/noattach/noattach.patterns.johncon
%%PORTDOCS%%@dirrm share/examples/noattach