Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
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.
+34
View File
@@ -0,0 +1,34 @@
===========================================================================
$NetBSD: MESSAGE,v 1.2 2004/08/03 08:23:06 jlam Exp $
In order to use with postfix, a possible configuration using clamsmtpd as
an after-queue content filter would be:
[main.cf]
content_filter = scan:localhost:10025
receive_override_options = no_address_mappings
[master.cf]
# AV scan filter (used by content_filter)
scan unix - - n - 16 smtp
-o smtp_send_xforward_command=yes
# For injecting mail back into postfix from the filter
localhost:10026 inet n - n - 16 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
That's all! please visit the following links for more information on this
setup:
${HOMEPAGE}postfix.html
http://www.postfix.org/FILTER_README.html
===========================================================================
+37
View File
@@ -0,0 +1,37 @@
# $NetBSD: Makefile,v 1.43 2012/10/08 12:19:03 asau Exp $
DISTNAME= clamsmtp-1.10
#PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://memberwebs.com/stef/software/clamsmtp/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://memberwebs.com/stef/software/clamsmtp/
COMMENT= SMTP filter that allows you to check for viruses
LICENSE= modified-bsd
PKG_INSTALLATION_TYPES= overwrite pkgviews
GNU_CONFIGURE= yes
RCD_SCRIPTS= clamsmtpd
MESSAGE_SUBST+= HOMEPAGE=${HOMEPAGE:Q}
FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER}
# Doesn't work with GNU pth (missing required mutex features)
PTHREAD_OPTS+= require native
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
CONF_FILES= ${EGDIR}/clamsmtpd.conf \
${PKG_SYSCONFDIR}/clamsmtpd.conf
INSTALLATION_DIRS= share/examples/${PKGBASE}
PKG_USERS_VARS= CLAMAV_USER
post-install:
${INSTALL_DATA} ${WRKSRC}/doc/clamsmtpd.conf ${DESTDIR}${EGDIR}
${INSTALL_SCRIPT} ${WRKSRC}/scripts/virus_action.sh ${DESTDIR}${EGDIR}
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+7
View File
@@ -0,0 +1,7 @@
@comment $NetBSD: PLIST,v 1.6 2009/06/14 18:04:27 joerg Exp $
man/man5/clamsmtpd.conf.5
man/man8/clamsmtpd.8
sbin/clamsmtpd
share/examples/clamsmtp/clamsmtpd.conf
share/examples/clamsmtp/virus_action.sh
share/examples/rc.d/clamsmtpd
+7
View File
@@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.23 2009/03/22 11:21:04 martti Exp $
SHA1 (clamsmtp-1.10.tar.gz) = 0bfbc39228ab40db5064917dd0805e06fdbfd598
RMD160 (clamsmtp-1.10.tar.gz) = 464047852f91d46af79340f10179106c2fb22bbc
Size (clamsmtp-1.10.tar.gz) = 217126 bytes
SHA1 (patch-aa) = f2ae4507b333816591b0c7f49c5e4ed16e4e4f95
SHA1 (patch-ab) = 489aae100fb380e83809a9896a36265de9a09ef9
+89
View File
@@ -0,0 +1,89 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: clamsmtpd.sh,v 1.8 2007/06/15 09:47:06 martti Exp $
#
# PROVIDE: clamsmtpd
# REQUIRE: LOGIN clamd
# BEFORE: mail
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start clamsmtpd:
#
# clamsmtpd=YES
#
# The following variables are optional:
#
# clamsmtpd_maxwait="600" # max wait time for clamd
# clamsmtpd_user="@CLAMAV_USER@" # user to run clamsmtpd as
# clamsmtpd_addr="localhost:10026" # address to forward mail to;
# # see clamsmtpd(8).
#
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="clamsmtpd"
rcvar="${name}"
command="@PREFIX@/sbin/${name}"
pidfile="@VARBASE@/run/clamsmtpd.pid"
start_precmd="clamsmtpd_prestart"
start_cmd="clamsmtpd_start"
clamav_conffile="@PKG_SYSCONFDIR@/clamd.conf"
if [ -f "${clamav_conffile}" ]; then
socket=`@AWK@ 'BEGIN {r = "/tmp/clamd"};
/^#/ {next}; /^LocalSocket[ ]/ {r = $2};
END {print r}' ${clamav_conffile}`
: ${clamsmtpd_user=`@AWK@ 'BEGIN {r = "@CLAMAV_USER@"};
/^#/ {next}; /^User[ ]/ {r = $2};
END {print r}' ${clamav_conffile}`}
else
: ${socket="/tmp/clamd"}
: ${clamsmtpd_user="@CLAMAV_USER@"}
fi
: ${clamsmtpd_maxwait="600"}
clamsmtpd_prestart()
{
if [ ! -S "${socket}" ]; then
@ECHO@ -n "Waiting max ${clamsmtpd_maxwait} seconds for clamd to become ready"
while [ ${clamsmtpd_maxwait} -gt 0 -a ! -S "${socket}" ]; do
@ECHO@ -n "."
sleep 10
clamsmtpd_maxwait=$((clamsmtpd_maxwait - 10))
done
if [ ! -S "${socket}" ]; then
@ECHO@ ""
@ECHO@ "ERROR: Unable to start clamsmtpd as clamd is not running!"
exit 1
fi
# Wait another 10 seconds so that clamd is really ready
@ECHO@ -n "."
sleep 10
@ECHO@ ""
fi
@TOUCH@ ${pidfile}
@CHOWN@ ${clamsmtpd_user} ${pidfile}
}
clamsmtpd_start()
{
@ECHO@ "Starting ${name}."
doit="${command} ${clamsmtpd_flags} -p ${pidfile}"
@SU@ -m ${clamsmtpd_user} -c "${doit}"
}
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config ${name}
run_rc_command "$1"
else
if [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
@ECHO@ -n " ${name}"
eval ${start_precmd}
eval ${start_cmd}
fi
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-aa,v 1.2 2008/01/09 14:10:06 martti Exp $
The default clamd socket as defined in pkgsrc/mail/clamav/files/clamd.sh
--- doc/clamsmtpd.conf.orig 2006-04-06 16:42:26.000000000 +0200
+++ doc/clamsmtpd.conf
@@ -29,7 +29,7 @@ OutAddress: 10026
#Listen: 0.0.0.0:10025
# The address clamd is listening on
-#ClamAddress: /var/run/clamav/clamd
+#ClamAddress: /tmp/clamd
# A header to add to all scanned email
#Header: X-Virus-Scanned: ClamAV using ClamSMTP
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-ab,v 1.3 2008/01/09 14:10:06 martti Exp $
The default clamd socket as defined in pkgsrc/mail/clamav/files/clamd.sh
--- src/clamsmtpd.c.orig 2006-08-25 08:26:44.000000000 +0200
+++ src/clamsmtpd.c 2006-08-25 08:26:59.000000000 +0200
@@ -107,7 +107,7 @@
#endif
#define DEFAULT_CONFIG CONF_PREFIX "/clamsmtpd.conf"
-#define DEFAULT_CLAMAV "/var/run/clamav/clamd"
+#define DEFAULT_CLAMAV "/tmp/clamd"
#define DEFAULT_HEADER "X-Virus-Scanned: ClamAV using ClamSMTP"
#define VIRUS_HEADER "X-Virus-Infected: Virus Detected!"