Date: 22 Mar 2005 14:25:55 -0000 From: Cristiano Deana <cris@gufi.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/79135: New port: mail/simscan A qmailqueue replacement written in C Message-ID: <20050322142555.5571.qmail@toshi.bmm.it> Resent-Message-ID: <200503221500.j2MF0BXt037741@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 79135 >Category: ports >Synopsis: New port: mail/simscan A qmailqueue replacement written in C >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: Tue Mar 22 15:00:10 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Cristiano Deana >Release: FreeBSD 5.4-PRERELEASE i386 >Organization: GUFI >Environment: System: FreeBSD toshi 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #11: Tue Mar 22 09:41:55 CET 2005 cris@toshi:/usr/obj/usr/src/sys/TOSHI i386 >Description: Request for a new port. simscan (http://http://www.inter7.com/?page=simscan) is a simple program that enables qmail-smtpd to reject viruses, spam, and block attachments during the SMTP conversation so the email never makes it into your computers. It is completely open source and uses other open source components. Very efficient and written in C. >How-To-Repeat: >Fix: # 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: # # simscan # simscan/Makefile # simscan/scripts # simscan/scripts/configure # simscan/pkg-descr # simscan/distinfo # simscan/pkg-install # simscan/pkg-plist # echo c - simscan mkdir -p simscan > /dev/null 2>&1 echo x - simscan/Makefile sed 's/^X//' >simscan/Makefile << 'END-of-simscan/Makefile' X# New ports collection makefile for: simscan X# Date created: 22 Mar 2005 X# Whom: cris X# X# $FreeBSD$ X# X XPORTNAME= simscan XPORTVERSION= 1.1 XCATEGORIES= mail XMASTER_SITES= http://www.inter7.com/simscan/ X XMAINTAINER= cris@gufi.org XCOMMENT= A qmailqueue replacement written in C X XBUILD_DEPENDS= ${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime X XGNU_CONFIGURE= yes XSLEEP= /bin/sleep XPREFIX?= /var/qmail X XCONFIGURE_ARGS= --enable-ripmime=${LOCALBASE}/bin/ripmime X XSPAM_THRESHOLD?=15 X X.if defined(WITH_SPAMASSASSIN) XBUILD_DEPENDS+= spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin XCONFIGURE_ARGS+= --enable-spam=y \ X --enable-spam-hits=${SPAM_THRESHOLD} X.endif X X.if defined(WITH_DROPMSG) XCONFIGURE_ARGS+= --enable-dropmsg=y X.endif X X.if defined(WITH_ATTACH) XCONFIGURE_ARGS+= --enable-attach=y X.endif X X.if defined(WITH_PER_DOMAIN) XCONFIGURE_ARGS+= --enable-per-domain=y X.endif X Xpre-configure: X @${ECHO} "#" X @${ECHO} "# User-configurable variables" X @${ECHO} "#" X @${ECHO} "# Define these to change from the default behaviour" X @${ECHO} "#" X @${ECHO} "# WITH_SPAMASSASSIN - enable SpamAssassin checks" X @${ECHO} "# WITH_DROPMSG - Drop message in case of virus/spam found. Don't return error to sender." X @${ECHO} "# WITH_ATTACH - Turn on attachment scanning. default no." X @${ECHO} "# WITH_PER_DOMAIN - Turn on per domain based checking." X @${ECHO} "#" X @${ECHO} "# Set these to the values you'd prefer" X @${ECHO} "#" X @${ECHO} "# SPAM_THRESHOLD - minimum score required to delete spam messages (requires spamassassin)" X @${ECHO} "#" X @${SLEEP} 10 X X.include <bsd.port.mk> END-of-simscan/Makefile echo c - simscan/scripts mkdir -p simscan/scripts > /dev/null 2>&1 echo x - simscan/scripts/configure sed 's/^X//' >simscan/scripts/configure << 'END-of-simscan/scripts/configure' X#!/bin/sh X# X# $FreeBSD$ X XUSER=simscan XGROUP=${USER} XUID=701 XGID=${UID} X Xecho adding simscan user X X X if pw group show "${GROUP}" 2>/dev/null; then X echo "You already have a group \"${GROUP}\", so I will use it." X else X if pw groupadd ${GROUP} -g ${GID}; then X echo "Added group \"${GROUP}\"." X else X echo "Adding group \"${GROUP}\" failed..." X exit 1 X fi X fi X X X if pw user show "${USER}" 2>/dev/null; then X echo "You already have a user \"${USER}\", so I will use it." X else X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ X -d /nonexistent -s /sbin/nologin -c "Simscan User" X then X echo "Added user \"${USER}\"." X else X echo "Adding user \"${USER}\" failed..." X exit 1 X fi X fi END-of-simscan/scripts/configure echo x - simscan/pkg-descr sed 's/^X//' >simscan/pkg-descr << 'END-of-simscan/pkg-descr' XSimscan is a simple program that enables qmail-smtpd to reject viruses, Xspam, and block attachments during the SMTP conversation so the email Xnever makes it into your computers. It is completely open source and Xuses other open source components. Very efficient and written in C. X XWWW: http://www.inter7.com/?page=simscan X X- cris Xcris@gufi.org END-of-simscan/pkg-descr echo x - simscan/distinfo sed 's/^X//' >simscan/distinfo << 'END-of-simscan/distinfo' XMD5 (simscan-1.1.tar.gz) = 2ba25145dc0c1b6159f26f3f4c03d3c6 XSIZE (simscan-1.1.tar.gz) = 130114 END-of-simscan/distinfo echo x - simscan/pkg-install sed 's/^X//' >simscan/pkg-install << 'END-of-simscan/pkg-install' X#!/bin/sh X# X# $FreeBSD$ X XUSER=simscan XGROUP=${USER} XUID=701 XGID=${UID} XSIMDIR=/var/qmail/simscan X Xif [ "$2" = "PRE-INSTALL" ]; then X Xecho adding simscan user X X if pw group show "${GROUP}" 2>/dev/null; then X echo "You already have a group \"${GROUP}\", so I will use it." X else X if pw groupadd ${GROUP} -g ${GID}; then X echo "Added group \"${GROUP}\"." X else X echo "Adding group \"${GROUP}\" failed..." X exit 1 X fi X fi X X X if pw user show "${USER}" 2>/dev/null; then X echo "You already have a user \"${USER}\", so I will use it." X else X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ X -d /nonexistent -s /sbin/nologin -c "Simscan User" X then X echo "Added user \"${USER}\"." X else X echo "Adding user \"${USER}\" failed..." X exit 1 X fi X fi X Xelif [ "$2" = "POST-INSTALL" ]; then X X if [ ! -d "$SIMDIR" ]; then X /bin/mkdir -p "$SIMDIR" || exit 1 X /usr/sbin/chown "$USER:$GROUP" "$SIMDIR" || exit 1 X /bin/chmod 0750 "$SIMDIR" || exit 1 X fi Xfi X Xexit 0 END-of-simscan/pkg-install echo x - simscan/pkg-plist sed 's/^X//' >simscan/pkg-plist << 'END-of-simscan/pkg-plist' Xbin/simscanmk X@owner simscan X@mode 04711 Xbin/simscan X X@dirrm simscan X@unexec echo "" X@unexec echo "If you are permanently removing simscan, you should also run" | /usr/bin/fmt X@unexec echo "'pw userdel simscan' to delete simscan user." | /usr/bin/fmt X@unexec echo "" END-of-simscan/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050322142555.5571.qmail>