summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorkefren <kefren@pkgsrc.org>2010-12-24 07:21:08 +0000
committerkefren <kefren@pkgsrc.org>2010-12-24 07:21:08 +0000
commita1f7aa9f422527d73c7bce52345a0c23d6fea092 (patch)
tree887b140c3e24eaf0e40bbc8d074ac64b1e932e5c /mail
parentfc4cb80fa7e7a8780ecfcabc5a7779bf4714ac38 (diff)
downloadpkgsrc-a1f7aa9f422527d73c7bce52345a0c23d6fea092.tar.gz
Move security/amavis-perl into mail/amavis-perl. No objections on tech-pkg@
Part of PR/32554
Diffstat (limited to 'mail')
-rw-r--r--mail/amavis-perl/DESCR5
-rw-r--r--mail/amavis-perl/Makefile103
-rw-r--r--mail/amavis-perl/PLIST21
-rw-r--r--mail/amavis-perl/PLIST.nomilter3
-rw-r--r--mail/amavis-perl/distinfo5
-rw-r--r--mail/amavis-perl/files/LICENSE.sendmail79
-rw-r--r--mail/amavis-perl/files/amavis.m440
-rw-r--r--mail/amavis-perl/options.mk22
8 files changed, 278 insertions, 0 deletions
diff --git a/mail/amavis-perl/DESCR b/mail/amavis-perl/DESCR
new file mode 100644
index 00000000000..52f54252074
--- /dev/null
+++ b/mail/amavis-perl/DESCR
@@ -0,0 +1,5 @@
+AMaViS (A Mail Virus Scanner) scans e-mail attachments for viruses
+using third-party virus scanners available for UNIX environments.
+It resides on a UNIX machine and looks through the attached files
+arriving via e-mail, generates reports when a virus is found, and
+sets the delivery on hold.
diff --git a/mail/amavis-perl/Makefile b/mail/amavis-perl/Makefile
new file mode 100644
index 00000000000..3206efc4360
--- /dev/null
+++ b/mail/amavis-perl/Makefile
@@ -0,0 +1,103 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/12/24 07:21:09 kefren Exp $
+
+DISTNAME= amavisd-${VERSION}
+PKGNAME= amavis-perl-${VERSION}
+PKGREVISION= 7
+CATEGORIES= mail security
+MASTER_SITES= http://www.amavis.org/dist/perl/ \
+ ${MASTER_SITE_SOURCEFORGE:=amavis/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://www.amavis.org/
+COMMENT= Mail virus scanner
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+CONFLICTS+= amavis-[0-9]*
+CONFLICTS+= amavis-perl-[0-9]*
+
+DEPENDS+= uvscan-[0-9]*:../../security/uvscan
+DEPENDS+= maildrop-[0-9]*:../../mail/maildrop
+DEPENDS+= tnef-[0-9]*:../../mail/tnef
+DEPENDS+= unzip-[0-9]*:../../archivers/unzip
+DEPENDS+= unarj-[0-9]*:../../archivers/unarj
+DEPENDS+= unrar-[0-9]*:../../archivers/unrar
+DEPENDS+= xbin-[0-9]*:../../archivers/xbin
+DEPENDS+= lha-[0-9]*:../../archivers/lha
+DEPENDS+= zoo-[0-9]*:../../archivers/zoo
+DEPENDS+= freeze-[0-9]*:../../archivers/freeze
+DEPENDS+= arc-[0-9]*:../../archivers/arc
+DEPENDS+= p5-Archive-Tar-[0-9]*:../../archivers/p5-Archive-Tar
+DEPENDS+= p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip
+DEPENDS+= p5-IO-Compress-[0-9]*:../../devel/p5-IO-Compress
+DEPENDS+= p5-Convert-TNEF-[0-9]*:../../converters/p5-Convert-TNEF
+DEPENDS+= p5-Convert-UUlib-[0-9]*:../../converters/p5-Convert-UUlib
+DEPENDS+= p5-MIME-tools>=5.313:../../mail/p5-MIME-tools
+DEPENDS+= {perl>=5.10,p5-Net-[0-9]*}:../../net/p5-Net
+DEPENDS+= p5-Unix-Syslog-[0-9]*:../../sysutils/p5-Unix-Syslog
+
+.include "options.mk"
+
+.include "../../mk/bsd.prefs.mk"
+
+VERSION= 0.1
+
+SMTPPORT?= 10025 # target port for scanned mails
+VIRUSDIR?= /var/log/virusmails # where to put contaminated mails
+VIRUSMAILTO?= security # whom to notify about viruses
+
+GNU_CONFIGURE= YES
+PLIST_SRC= ${PKGDIR}/PLIST
+
+USE_TOOLS+= file perl:run
+CONFIGURE_ENV+= file=${TOOLS_FILE_CMD:Q}
+
+CONFIGURE_ENV+= procmail="/usr/libexec/mail.local"
+
+CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc/amavis
+CONFIGURE_ARGS+=--with-virusdir=${VIRUSDIR:Q}
+CONFIGURE_ARGS+=--with-mailto=${VIRUSMAILTO:Q}
+CONFIGURE_ARGS+=--enable-all
+CONFIGURE_ARGS+=--with-amavisuser=amavis
+CONFIGURE_ARGS+=--with-perl=${PERL5}
+
+INSTALLATION_DIRS= sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 \
+ ${PKGMANDIR}/man8 share/doc/amavis
+
+post-build:
+ ${SED} -e "s|/etc/amavisd.conf|${PREFIX}/etc/amavis/amavisd.conf|" \
+ ${WRKSRC}/amavis/amavisd > ${WRKDIR}/amavisd
+
+do-install:
+ # Program files
+.if empty(PKG_OPTIONS:Mmilter)
+ ${INSTALL_PROGRAM} ${WRKSRC}/amavis/amavis ${DESTDIR}${PREFIX}/sbin
+.endif
+ ${INSTALL_SCRIPT} ${WRKDIR}/amavisd ${DESTDIR}${PREFIX}/sbin
+ # Documents
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavis.html ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavis.png ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavis.txt ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${FILESDIR}/LICENSE.sendmail ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/FAQ ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/NEWS ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/README.exim ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/README.milter ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/README.postfix ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/README.qmail ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/README.scanners ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/README.sendmail ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${INSTALL_DATA} ${WRKSRC}/amavis/amavisd.conf \
+ ${DESTDIR}${PREFIX}/share/doc/amavis
+ ${SED} "s+@PREFIX@+${PREFIX}+g" < ${FILESDIR}/amavis.m4 \
+ > ${WRKDIR}/amavis.m4
+ ${INSTALL_DATA} ${WRKDIR}/amavis.m4 ${DESTDIR}${PREFIX}/share/doc/amavis
+ # Man pages
+.if empty(PKG_OPTIONS:Mmilter)
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavis.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavis-milter.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavisd.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+ ${INSTALL_DATA} ${WRKSRC}/doc/amavisd.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/amavis-perl/PLIST b/mail/amavis-perl/PLIST
new file mode 100644
index 00000000000..1d067f78f25
--- /dev/null
+++ b/mail/amavis-perl/PLIST
@@ -0,0 +1,21 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/12/24 07:21:08 kefren Exp $
+man/man1/amavis-milter.1
+man/man1/amavis.1
+man/man5/amavisd.conf.5
+man/man8/amavisd.8
+sbin/amavis
+sbin/amavisd
+share/doc/amavis/FAQ
+share/doc/amavis/LICENSE.sendmail
+share/doc/amavis/NEWS
+share/doc/amavis/README.exim
+share/doc/amavis/README.milter
+share/doc/amavis/README.postfix
+share/doc/amavis/README.qmail
+share/doc/amavis/README.scanners
+share/doc/amavis/README.sendmail
+share/doc/amavis/amavis.html
+share/doc/amavis/amavis.m4
+share/doc/amavis/amavis.png
+share/doc/amavis/amavis.txt
+share/doc/amavis/amavisd.conf
diff --git a/mail/amavis-perl/PLIST.nomilter b/mail/amavis-perl/PLIST.nomilter
new file mode 100644
index 00000000000..0e73869da2a
--- /dev/null
+++ b/mail/amavis-perl/PLIST.nomilter
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.nomilter,v 1.1.1.1 2010/12/24 07:21:08 kefren Exp $
+man/man1/amavis.1
+sbin/amavis
diff --git a/mail/amavis-perl/distinfo b/mail/amavis-perl/distinfo
new file mode 100644
index 00000000000..c8643df071d
--- /dev/null
+++ b/mail/amavis-perl/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/12/24 07:21:08 kefren Exp $
+
+SHA1 (amavisd-0.1.tar.gz) = 0c8cfe497ee0e42c2f5ff5c958e47e8a0d08720b
+RMD160 (amavisd-0.1.tar.gz) = d1688aa5a0a4df36e7d938f28d923b350302faa2
+Size (amavisd-0.1.tar.gz) = 329501 bytes
diff --git a/mail/amavis-perl/files/LICENSE.sendmail b/mail/amavis-perl/files/LICENSE.sendmail
new file mode 100644
index 00000000000..30c49986fbd
--- /dev/null
+++ b/mail/amavis-perl/files/LICENSE.sendmail
@@ -0,0 +1,79 @@
+ SENDMAIL LICENSE
+
+The following license terms and conditions apply, unless a different
+license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor,
+Emeryville, CA 94608, or by electronic mail at license@sendmail.com.
+
+License Terms:
+
+Use, Modification and Redistribution (including distribution of any
+modified or derived work) in source and binary forms is permitted only if
+each of the following conditions is met:
+
+1. Redistributions qualify as "freeware" or "Open Source Software" under
+ one of the following terms:
+
+ (a) Redistributions are made at no charge beyond the reasonable cost of
+ materials and delivery.
+
+ (b) Redistributions are accompanied by a copy of the Source Code or by an
+ irrevocable offer to provide a copy of the Source Code for up to three
+ years at the cost of materials and delivery. Such redistributions
+ must allow further use, modification, and redistribution of the Source
+ Code under substantially the same terms as this license. For the
+ purposes of redistribution "Source Code" means the complete compilable
+ and linkable source code of sendmail including all modifications.
+
+2. Redistributions of source code must retain the copyright notices as they
+ appear in each source code file, these license terms, and the
+ disclaimer/limitation of liability set forth as paragraph 6 below.
+
+3. Redistributions in binary form must reproduce the Copyright Notice,
+ these license terms, and the disclaimer/limitation of liability set
+ forth as paragraph 6 below, in the documentation and/or other materials
+ provided with the distribution. For the purposes of binary distribution
+ the "Copyright Notice" refers to the following language:
+ "Copyright (c) 1998-2000 Sendmail, Inc. All rights reserved."
+
+4. Neither the name of Sendmail, Inc. nor the University of California nor
+ the names of their contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission. The name "sendmail" is a trademark of Sendmail, Inc.
+
+5. All redistributions must comply with the conditions imposed by the
+ University of California on certain embedded code, whose copyright
+ notice and conditions for redistribution are as follows:
+
+ (a) Copyright (c) 1988, 1993 The Regents of the University of
+ California. All rights reserved.
+
+ (b) Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ (i) Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ (ii) Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ (iii) Neither the name of the University nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY
+ SENDMAIL, INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF
+ CALIFORNIA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Revision: 8.9, Last updated Date: 2000/03/03 19:24:11
diff --git a/mail/amavis-perl/files/amavis.m4 b/mail/amavis-perl/files/amavis.m4
new file mode 100644
index 00000000000..ed17c900105
--- /dev/null
+++ b/mail/amavis-perl/files/amavis.m4
@@ -0,0 +1,40 @@
+PUSHDIVERT(-1)
+#
+# amavis mailer definition for amavis-perl (http://www.amavis.org)
+#
+# Copyright (c) 2000 Yan Seiner
+# GPL distribution - all disclaimers apply.
+#
+# Adopted & extented by Rainer Link, SuSE GmbH, <link@suse.de>, 03/02/2001
+#
+# Currently UNTESTED
+# USE AT YOUR OWN RISK
+#
+
+ifdef(`AMAVIS_MAILER_ARGS',,
+ `define(`AMAVIS_MAILER_ARGS', amavis $f $u)')
+ifdef(`AMAVIS_MAILER_PATH',,
+ `define(`AMAVIS_MAILER_PATH', @PREFIX@/sbin/amavis)')
+ifdef(`AMAVIS_MAILER_FLAGS',,
+ `define(`AMAVIS_MAILER_FLAGS', `mlsACDFMS5:/|@qhP')')
+ifdef(`AMAVIS_MAILER_USER',,
+ `define(`AMAVIS_MAILER_USER', amavis)')
+ifdef(`AMAVIS_MAILER_GROUP',,
+ `define(`AMAVIS_MAILER_GROUP', amavis)')
+
+
+POPDIVERT
+#######################################
+### AMAVIS Mailer specification ###
+#######################################
+
+VERSIONID(`@(#)amavis.m4 03/02/2001')
+
+Mamavis, P=AMAVIS_MAILER_PATH, F=AMAVIS_MAILER_FLAGS, S=0, R=0,
+ T=DNS/RFC822/X-Unix,
+ ifdef(`AMAVIS_MAILER_MAX', `M=AMAVIS_MAILER_MAX, ')A=AMAVIS_MAILER_ARGS,
+ U=AMAVIS_MAILER_USER:AMAVIS_MAILER_GROUP
+
+LOCAL_RULE_0
+R$* $#amavis $:$1
+
diff --git a/mail/amavis-perl/options.mk b/mail/amavis-perl/options.mk
new file mode 100644
index 00000000000..15ff563e8fa
--- /dev/null
+++ b/mail/amavis-perl/options.mk
@@ -0,0 +1,22 @@
+# $NetBSD: options.mk,v 1.1.1.1 2010/12/24 07:21:08 kefren Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.amavis-perl
+PKG_SUPPORTED_OPTIONS= milter
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmilter)
+DEPENDS+= sendmail>=8.12.9nb1:../../mail/sendmail
+
+# XXX Milter needs pthreads, and configure fails looking for it
+# because ${PREFIX}/include is not available in the include path.
+CONFIGURE_ENV+= CFLAGS="-I${PREFIX}/include"
+.include "../../mk/pthread.buildlink3.mk"
+
+CONFIGURE_ARGS+=--enable-milter
+CONFIGURE_ARGS+=--with-milter-libs=${PREFIX}/lib
+CONFIGURE_ARGS+=--with-milter-includes=${PREFIX}/include
+.else
+CONFIGURE_ARGS+=--enable-smtp --with-smtp-port=${SMTPPORT:Q}
+PLIST_SRC+= ${PKGDIR}/PLIST.nomilter
+.endif