diff options
author | vanilla <vanilla@FreeBSD.org> | 2004-07-30 00:35:57 +0000 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2004-07-30 00:35:57 +0000 |
commit | 9b705f03fe784c91d9256aa4574b3af3f507633f (patch) | |
tree | 112e1997c75a167e6336b58632e6a8b9dfeae92a /security/clamsmtp | |
parent | e9e033388dfb2d28df20ae5008689a3950741bcf (diff) | |
download | FreeBSD-ports-9b705f03fe784c91d9256aa4574b3af3f507633f.zip FreeBSD-ports-9b705f03fe784c91d9256aa4574b3af3f507633f.tar.gz |
Add clamsmtp 0.4, an ClamAV anti-virus SMTP Filter.
PR: ports/69739
Submitted by: Cheng-Lung Sung <clsung@dragon2.net>
Diffstat (limited to 'security/clamsmtp')
-rw-r--r-- | security/clamsmtp/Makefile | 43 | ||||
-rw-r--r-- | security/clamsmtp/distinfo | 2 | ||||
-rw-r--r-- | security/clamsmtp/files/clamsmtpd.sh.tmpl | 36 | ||||
-rw-r--r-- | security/clamsmtp/pkg-descr | 12 | ||||
-rw-r--r-- | security/clamsmtp/pkg-message | 17 | ||||
-rw-r--r-- | security/clamsmtp/pkg-plist | 4 |
6 files changed, 114 insertions, 0 deletions
diff --git a/security/clamsmtp/Makefile b/security/clamsmtp/Makefile new file mode 100644 index 0000000..ede8f28 --- /dev/null +++ b/security/clamsmtp/Makefile @@ -0,0 +1,43 @@ +# New ports collection makefile for: clamsmtp +# Date created: 2004-07-29 +# Whom: Cheng-Lung Sung <clsung@dragon2.net> +# +# $FreeBSD$ +# + +PORTNAME= clamsmtp +PORTVERSION= 0.4 +CATEGORIES= security +MASTER_SITES= http://memberwebs.com/nielsen/software/clamsmtp/ + +MAINTAINER= clsung@dragon2.net +COMMENT= An ClamAV anti-virus SMTP Filter + +RUN_DEPENDS= clamd:${PORTSDIR}/security/clamav + +HAS_CONFIGURE= yes +USE_GMAKE= yes +USE_REINPLACE= yes +USE_RC_SUBR= yes +RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} CLAMAV_USER=${CLAMAV_USER} \ + CLAMAV_PID_DIR=${CLAMAV_PID_DIR} CLAMAV_GROUP=${CLAMAV_GROUP} \ + CLAMAV_CLAMD_SOCKET=${CLAMAV_CLAMD_SOCKET} +STARTUP_FILE= ${PREFIX}/etc/rc.d/clamsmtpd.sh + +CLAMAV_USER?= clamav +CLAMAV_GROUP?= clamav +CLAMAV_PID_DIR?= /var/run/clamav +CLAMAV_CLAMD_SOCKET?= /var/run/clamav/clamd + +MAN8= clamsmtpd.8 + +post-patch: + @${REINPLACE_CMD} -e 's,10025,10026,g' ${WRKSRC}/src/clamsmtpd.c ${WRKSRC}/src/clamsmtpd.8 + +post-install: + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/clamsmtpd.sh.tmpl > ${STARTUP_FILE} + @${CHMOD} 755 ${STARTUP_FILE} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/security/clamsmtp/distinfo b/security/clamsmtp/distinfo new file mode 100644 index 0000000..8da9a8a --- /dev/null +++ b/security/clamsmtp/distinfo @@ -0,0 +1,2 @@ +MD5 (clamsmtp-0.4.tar.gz) = 08b62494096f66d854eaab9df646e9c3 +SIZE (clamsmtp-0.4.tar.gz) = 119005 diff --git a/security/clamsmtp/files/clamsmtpd.sh.tmpl b/security/clamsmtp/files/clamsmtpd.sh.tmpl new file mode 100644 index 0000000..3f0c146 --- /dev/null +++ b/security/clamsmtp/files/clamsmtpd.sh.tmpl @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: clamsmtpd +# REQUIRE: DAEMON +# KEYWORD: FreeBSD +# +# Add the fellowing line to /etc/rc.conf to enable clamsmtpd: +# +# clamsmtpd_enable="YES" +# + +. %%RC_SUBR%% + +name=clamsmtpd +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/${name} +sig_stop=-KILL + +load_rc_config ${name} + +clamsmtpd_enable=${clamsmtpd_enable-"NO"} +clamsmtpd_smtp=${clamsmtpd_smtp-"mysmtp.com:25"} +clamsmtpd_pid=${clamsmtpd_pid-"%%CLAMAV_PID_DIR%%/clamsmtpd.pid"} +clamsmtpd_socket=${clamsmtpd_socket-"%%CLAMAV_CLAMD_SOCKET%%"} +clamsmtpd_user=${clamsmtpd_user-"%%CLAMAV_USER%%"} +clamsmtpd_group=${clamsmtpd_group-"%%CLAMAV_GROUP%%"} +clamsmtpd_tmpdir=${clamsmtpd_tmpdir-"/var/tmp"} + +command_args="-c ${clamsmtpd_socket} -D ${clamsmtpd_tmpdir} -p ${clamsmtpd_pid} ${clamsmtpd_smtp}" + +pidfile=${clamsmtpd_pid} + +run_rc_command "$1" diff --git a/security/clamsmtp/pkg-descr b/security/clamsmtp/pkg-descr new file mode 100644 index 0000000..ab6aea2 --- /dev/null +++ b/security/clamsmtp/pkg-descr @@ -0,0 +1,12 @@ +ClamSMTP is an SMTP filter that allows you to check for viruses using +the ClamAV anti-virus software. It accepts SMTP connections and forwards +the SMTP commands and responses to another SMTP server. The 'DATA' email +body is intercepted and scanned before forwarding. + +ClamSMTP aims to be lightweight, reliable, and simple rather than have a +myriad of options. It's written in C without major dependencies. If you +need more options then you could use something big like AMaViS which is +written in PERL and can do almost anything. + +Author: Nielsen <nielsen at memberwebs.com> +WWW: http://memberwebs.com/nielsen/software/clamsmtp/ diff --git a/security/clamsmtp/pkg-message b/security/clamsmtp/pkg-message new file mode 100644 index 0000000..94e0853 --- /dev/null +++ b/security/clamsmtp/pkg-message @@ -0,0 +1,17 @@ +Remember to modify /etc/rc.conf, change entry + +clamsmtpd_smtp="mysmtp.com:25" + +to your smtp server setting, and set + +clamsmtpd_enable="YES" + +to enable clamsmtpd. + +To work with postfix, put following lines in Postfix' main.cf: + +content_filter = scan:127.0.0.1:10026 +receive_override_options = no_address_mappings + +And modify master.cf to active it. See also +http://memberwebs.com/nielsen/software/clamsmtp/postfix.html diff --git a/security/clamsmtp/pkg-plist b/security/clamsmtp/pkg-plist new file mode 100644 index 0000000..fc0f503 --- /dev/null +++ b/security/clamsmtp/pkg-plist @@ -0,0 +1,4 @@ +@comment $FreeBSD$ +@unexec [ ! -f %%CLAMAV_PID_DIR%%/clamsmtpd.pid ] || %%PREFIX%%/etc/rc.d/clamsmtpd.sh stop || true +sbin/clamsmtpd +etc/rc.d/clamsmtpd.sh |