aboutsummaryrefslogtreecommitdiff
path: root/security/clamsmtp
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2004-07-30 00:35:57 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2004-07-30 00:35:57 +0000
commitad8f963bdca3e4c760c490d0392911cd56d141d3 (patch)
tree41f00cafaef40a5c70fd36dc3981b65b61a4bbcb /security/clamsmtp
parent76b95d16c64a459a8b7aade9b091a7f16e2e9a3e (diff)
downloadports-ad8f963bdca3e4c760c490d0392911cd56d141d3.tar.gz
ports-ad8f963bdca3e4c760c490d0392911cd56d141d3.zip
Notes
Diffstat (limited to 'security/clamsmtp')
-rw-r--r--security/clamsmtp/Makefile43
-rw-r--r--security/clamsmtp/distinfo2
-rw-r--r--security/clamsmtp/files/clamsmtpd.sh.tmpl36
-rw-r--r--security/clamsmtp/pkg-descr12
-rw-r--r--security/clamsmtp/pkg-message17
-rw-r--r--security/clamsmtp/pkg-plist4
6 files changed, 114 insertions, 0 deletions
diff --git a/security/clamsmtp/Makefile b/security/clamsmtp/Makefile
new file mode 100644
index 000000000000..ede8f28370ba
--- /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 000000000000..8da9a8a74ee1
--- /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 000000000000..3f0c1468c6c2
--- /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 000000000000..ab6aea29be4b
--- /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 000000000000..94e0853362d5
--- /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 000000000000..fc0f503f82b2
--- /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