ports/69739: [NEW PORT] security/clamsmtp: An ClamAV anti-virus SMTP Filter

Cheng-Lung Sung clsung at dragon2.net
Thu Jul 29 04:00:46 UTC 2004


>Number:         69739
>Category:       ports
>Synopsis:       [NEW PORT] security/clamsmtp: An ClamAV anti-virus SMTP Filter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 04:00:44 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Cheng-Lung Sung
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
FreeBSD @ Taiwan
>Environment:
System: FreeBSD sungsung.csie.nctu.edu.tw 4.10-RELEASE FreeBSD 4.10-RELEASE #1: Wed Jun  9 11:27:45 CST
>Description:
- grab maintainership
- dependency set to security/clamav, not security/clamav-devel
  maybe committers have better choices...
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/

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- clamsmtp-0.4.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	clamsmtp
#	clamsmtp/pkg-descr
#	clamsmtp/Makefile
#	clamsmtp/pkg-plist
#	clamsmtp/distinfo
#	clamsmtp/files
#	clamsmtp/files/clamsmtpd.sh
#	clamsmtp/pkg-message
#
echo c - clamsmtp
mkdir -p clamsmtp > /dev/null 2>&1
echo x - clamsmtp/pkg-descr
sed 's/^X//' >clamsmtp/pkg-descr << 'END-of-clamsmtp/pkg-descr'
XClamSMTP is an SMTP filter that allows you to check for viruses using 
Xthe ClamAV anti-virus software. It accepts SMTP connections and forwards 
Xthe SMTP commands and responses to another SMTP server. The 'DATA' email 
Xbody is intercepted and scanned before forwarding.
X
XClamSMTP aims to be lightweight, reliable, and simple rather than have a 
Xmyriad of options. It's written in C without major dependencies. If you 
Xneed more options then you could use something big like AMaViS which is 
Xwritten in PERL and can do almost anything.
X
XAuthor:	Nielsen <nielsen at memberwebs.com>
XWWW:	http://memberwebs.com/nielsen/software/clamsmtp/
END-of-clamsmtp/pkg-descr
echo x - clamsmtp/Makefile
sed 's/^X//' >clamsmtp/Makefile << 'END-of-clamsmtp/Makefile'
X# New ports collection makefile for:	clamsmtp
X# Date created:		2004-07-29
X# Whom:			Cheng-Lung Sung <clsung at dragon2.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	clamsmtp
XPORTVERSION=	0.4
XCATEGORIES=	security
XMASTER_SITES=	http://memberwebs.com/nielsen/software/
XMASTER_SITE_SUBDIR=	clamsmtp
X
XMAINTAINER=	clsung at dragon2.net
XCOMMENT=	An ClamAV anti-virus SMTP Filter
X
XRUN_DEPENDS=	clamd:${PORTSDIR}/security/clamav
X
XHAS_CONFIGURE=	yes
XUSE_GMAKE=	yes
X
XCLAMAVUSER?=	clamav
XCLAMAV_PID_DIR?=	/var/run/clamav/
XCLAMAV_CLAMD_SOCKET?=	/var/run/clamav/clamd
X
XMAN8=		clamsmtpd.8
X
X.include <bsd.port.pre.mk>
X
Xpost-install:
X	@${SED} 's|%%PREFIX%%|${PREFIX}|g;s|%%CLAMAVUSER%%|${CLAMAVUSER}|g;s|%%CLAMAV_CLAMD_SOCKET%%|${CLAMAV_CLAMD_SOCKET}|g;s|%%CLAMAV_PID_DIR%%|${CLAMAV_PID_DIR}|g' < ${FILESDIR}/clamsmtpd.sh > ${PREFIX}/etc/rc.d/clamsmtpd.sh
X	@${CHMOD} 750 ${PREFIX}/etc/rc.d/clamsmtpd.sh
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-clamsmtp/Makefile
echo x - clamsmtp/pkg-plist
sed 's/^X//' >clamsmtp/pkg-plist << 'END-of-clamsmtp/pkg-plist'
X at comment $FreeBSD$
X at unexec [ ! -f %%CLAMAV_PID_DIR%%/clamsmtpd.pid ] || %%PREFIX%%/etc/rc.d/clamsmtpd.sh stop || true
Xsbin/clamsmtpd
Xetc/rc.d/clamsmtpd.sh
END-of-clamsmtp/pkg-plist
echo x - clamsmtp/distinfo
sed 's/^X//' >clamsmtp/distinfo << 'END-of-clamsmtp/distinfo'
XMD5 (clamsmtp-0.4.tar.gz) = 08b62494096f66d854eaab9df646e9c3
XSIZE (clamsmtp-0.4.tar.gz) = 119005
END-of-clamsmtp/distinfo
echo c - clamsmtp/files
mkdir -p clamsmtp/files > /dev/null 2>&1
echo x - clamsmtp/files/clamsmtpd.sh
sed 's/^X//' >clamsmtp/files/clamsmtpd.sh << 'END-of-clamsmtp/files/clamsmtpd.sh'
X#!/bin/sh
X
X###########################################################################
X# CONFIGURATION
X
X# The outgoing SMTP server (CHANGE THIS)
Xsmtp=mysmtp.com:25
X
X# Directory for temporary files (CHANGE THIS)
Xtmpdir=/var/tmp 
X
X# The user to run as
Xuser=%%CLAMAVUSER%%
X
X# The prefix clamsmtpd was installed to
Xprefix=%%PREFIX%%
X
X# The location for pid file
Xpiddir=%%CLAMAV_PID_DIR%%
X
X# The clamd socket
Xclamsock=%%CLAMAV_CLAMD_SOCKET%%
X
X
X###########################################################################
X# SCRIPT
X            
Xcase $1 in
Xstart)
X        mkdir -p $piddir
X        chown $user $piddir
X        su -m $user -c "$prefix/sbin/clamsmtpd -c $clamsock -D $tmpdir -p $piddir/clamsmtpd.pid $smtp"
X        echo -n "clam-smtpd "
X        ;;
Xstop)
X        [ -f $piddir/clamsmtpd.pid ] && kill `cat $piddir/clamsmtpd.pid`
X        echo -n "clam-smtpd "
X        ;;
X*)
X        echo "usage: clamsmptd.sh {start|stop}" >&2
X        ;;
Xesac
END-of-clamsmtp/files/clamsmtpd.sh
echo x - clamsmtp/pkg-message
sed 's/^X//' >clamsmtp/pkg-message << 'END-of-clamsmtp/pkg-message'
X/* =================== NOTE ========================= */
XRemember to modify
X    "/usr/local/etc/rc.d/clamsmtpd.sh"
Xchange entry
X    "smtp=mysmtp.com:25"
Xto your smtp server setting.
X
XTo work with postfix , see
Xhttp://memberwebs.com/nielsen/software/clamsmtp/postfix.html
X/* ================================================== */
END-of-clamsmtp/pkg-message
exit
--- clamsmtp-0.4.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list