pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/amavisd-new Reimport mail/amavisd-new as secu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9984aad5f131
branches:  trunk
changeset: 479163:9984aad5f131
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Aug 06 15:05:53 2004 +0000

description:
Reimport mail/amavisd-new as security/amavisd-new.

amavisd-new is an interface between message transfer agent (MTA) and
one or more content checkers, e.g. virus scanners, SpamAssassin, etc.
It is a performance-enhanced and feature-enriched version of amavisd
(which in turn is a daemonized version of AMaViS or amavis-perl).

amavisd-new is normally positioned at or near a central mailer, not
necessarily where user's mailboxes and final delivery takes place.  If
you are looking for fully per-user configurable and/or low-message-rate
solution to be placed at the final stage of mail delivery (e.g. called
from procmail), there may be other solutions more appropriate for your
needs.

Package created and maintained by Julian Dunn in pkgsrc-wip.

diffstat:

 security/amavisd-new/DESCR                 |   11 ++
 security/amavisd-new/MESSAGE               |   21 ++++
 security/amavisd-new/MESSAGE.milter        |   24 +++++
 security/amavisd-new/Makefile              |  134 +++++++++++++++++++++++++++++
 security/amavisd-new/PLIST                 |   33 +++++++
 security/amavisd-new/distinfo              |    5 +
 security/amavisd-new/files/amavisd.sh      |   77 ++++++++++++++++
 security/amavisd-new/files/amavismilter.sh |   57 ++++++++++++
 security/amavisd-new/patches/patch-aa      |   42 +++++++++
 9 files changed, 404 insertions(+), 0 deletions(-)

diffs (truncated from 440 to 300 lines):

diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/DESCR        Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,11 @@
+amavisd-new is an interface between message transfer agent (MTA) and
+one or more content checkers, e.g. virus scanners, SpamAssassin, etc.
+It is a performance-enhanced and feature-enriched version of amavisd
+(which in turn is a daemonized version of AMaViS or amavis-perl).
+
+amavisd-new is normally positioned at or near a central mailer, not
+necessarily where user's mailboxes and final delivery takes place.  If
+you are looking for fully per-user configurable and/or low-message-rate
+solution to be placed at the final stage of mail delivery (e.g. called
+from procmail), there may be other solutions more appropriate for your
+needs.
diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/MESSAGE      Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,21 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2004/08/06 15:05:54 jlam Exp $
+
+To use amavisd-new, you should install at least one content checker.
+Examples of content checkers include the freely-available Clam Anti-Virus
+(mail/p5-Mail-ClamAV) and SpamAssassin (mail/spamassassin).
+
+amavisd-new will only scan inside archives if the appropriate unarchiving
+tools are available.  You may choose to install the following tools to
+scan the respective archive types:
+
+       arc             archivers/arc
+       freeze          archivers/freeze
+       lha             archivers/lha
+       lzop            archivers/lzop
+       unarj           archivers/unarj
+       unrar           archivers/unrar
+       xbin            archivers/xbin
+       zoo             archivers/zoo
+
+===========================================================================
diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/MESSAGE.milter
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/MESSAGE.milter       Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,24 @@
+===========================================================================
+$NetBSD: MESSAGE.milter,v 1.1.1.1 2004/08/06 15:05:53 jlam Exp $
+
+Before using amavisd-new with Sendmail, you must configure Sendmail
+properly.  Please refer to the following documentation:
+
+       ${PREFIX}/share/doc/amavisd-new/README.milter
+       ${PREFIX}/share/doc/amavisd-new/README.sendmail
+       ${PREFIX}/share/doc/amavisd-new/README.sendmail-dual
+
+There are several ways to configure Sendmail to pass mail through
+amavisd-new depending on your resources and whether you wish to use
+libmilter.
+
+If you choose to use libmilter, then you will need to add the following
+line to /etc/rc.conf:
+
+       amavismilter=YES
+
+Please refer to the comments at the top of the amavismilter rc.d script
+for additional rc.conf settings to modify how libmilter and amavisd-new
+communicate with each other.
+
+===========================================================================
diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/Makefile     Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,134 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/08/06 15:05:54 jlam Exp $
+
+DISTNAME=      amavisd-new-${VERSION}${PATCHLEVEL}
+PKGNAME=       amavisd-new-${VERSION}${PATCHLEVEL:S/-//}
+CATEGORIES=    security mail
+MASTER_SITES=  http://www.ijs.si/software/amavisd/ \
+               http://mirrors.catpipe.net/amavisd-new/ \
+               http://ftp.cfu.net/pub/amavisd-new/ \
+               ftp://ftp.cfu.net/pub/amavisd-new/
+
+VERSION=       20040701
+PATCHLEVEL=    # empty
+
+MAINTAINER=    jdunn%aquezada.com@localhost
+HOMEPAGE=      http://www.ijs.si/software/amavisd/
+COMMENT=       daemonized interface between MTA and content checkers
+
+DEPENDS+=      p5-Archive-Tar-[0-9]*:../../archivers/p5-Archive-Tar
+DEPENDS+=      p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip
+DEPENDS+=      p5-BerkeleyDB-[0-9]*:../../databases/p5-BerkeleyDB
+DEPENDS+=      p5-Compress-Zlib-[0-9]*:../../devel/p5-Compress-Zlib
+DEPENDS+=      p5-Convert-TNEF-[0-9]*:../../converters/p5-Convert-TNEF
+DEPENDS+=      p5-Convert-UUlib-[0-9]*:../../converters/p5-Convert-UUlib
+DEPENDS+=      p5-Digest-MD5-[0-9]*:../../security/p5-Digest-MD5
+DEPENDS+=      p5-MIME-tools>=5.313:../../mail/p5-MIME-tools
+DEPENDS+=      p5-Net-[0-9]*:../../net/p5-Net
+DEPENDS+=      p5-Net-Server-[0-9]*:../../net/p5-Net-Server
+DEPENDS+=      p5-Time-HiRes-[0-9]*:../../time/p5-Time-HiRes
+DEPENDS+=      p5-Unix-Syslog-[0-9]*:../../sysutils/p5-Unix-Syslog
+
+WRKSRC=                ${WRKDIR}/amavisd-new-${VERSION}
+
+CONFLICTS+=    amavis-[0-9]*
+CONFLICTS+=    amavis-perl-[0-9]*
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_PERL5=             yes
+PERL5_REQD=            5.8.2
+REPLACE_PERL+=         amavisd
+
+USE_PKGINSTALL=                yes
+AMAVIS_USER?=          vscan
+AMAVIS_GROUP?=         vscan
+AMAVIS_DIR?=           ${VARBASE}/amavis
+AMAVIS_QUARANTINE?=    ${VARBASE}/virusmails
+DOCDIR=                        ${PREFIX}/share/doc/amavisd-new
+EGDIR=                 ${PREFIX}/share/examples/amavisd-new
+MESSAGE_SRC=           ${PKGDIR}/MESSAGE
+
+BUILD_DEFS+=           AMAVIS_USER AMAVIS_GROUP AMAVIS_DIR AMAVIS_QUARANTINE
+FILES_SUBST+=          AMAVIS_USER=${AMAVIS_USER}
+FILES_SUBST+=          AMAVIS_GROUP=${AMAVIS_GROUP}
+FILES_SUBST+=          AMAVIS_DIR=${AMAVIS_DIR}
+FILES_SUBST+=          AMAVIS_QUARANTINE=${AMAVIS_QUARANTINE}
+
+PKG_GROUPS=    ${AMAVIS_GROUP}
+PKG_USERS=     ${AMAVIS_USER}:${AMAVIS_GROUP}::Virus\\ Scanning\\ Account:${AMAVIS_DIR}:${SH}
+RCD_SCRIPTS=   amavisd
+CONF_FILES=    ${EGDIR}/amavisd.conf-minimal ${PKG_SYSCONFDIR}/amavisd.conf
+
+# Global and legacy options
+.if defined(USE_MILTER)
+.  if !defined(PKG_OPTIONS.amavisd-new)
+.    if defined(USE_MILTER) && !empty(USE_MILTER:M[Yy][Es][Ss])
+PKG_OPTIONS.amavisd-new+=      milter
+.    endif
+.  endif
+.endif
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.amavisd-new
+PKG_SUPPORTED_OPTIONS= milter
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mmilter)
+USE_BUILDLINK3=        yes
+GNU_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --with-runtime-dir=${AMAVIS_DIR}
+CONFIGURE_ARGS+=       --with-sockname=${AMAVIS_DIR}/amavisd.sock
+CONFIGURE_ARGS+=       --with-user=${AMAVIS_USER}
+CONFIGURE_ARGS+=       --with-milterinc=${BUILDLINK_PREFIX.libmilter}/include
+CONFIGURE_ARGS+=       --with-milterlib=${BUILDLINK_PREFIX.libmilter}/lib
+CONFIGURE_DIRS=                ${WRKSRC}/helper-progs
+BUILD_DIRS=            ${WRKSRC}/helper-progs
+RCD_SCRIPTS+=          amavismilter
+MESSAGE_SRC+=          ${PKGDIR}/MESSAGE.milter
+PLIST_SUBST+=          MILTER=
+
+PTHREAD_OPTS+=          require native # doesn't work with pth
+.  include "../../mail/libmilter/buildlink3.mk"
+.  include "../../mk/pthread.buildlink3.mk"
+.else
+USE_LANGUAGES=         # empty
+NO_BUILDLINK=          yes
+NO_CONFIGURE=          yes
+PLIST_SUBST+=          MILTER="@comment "
+
+do-build:      replace-interpreter
+.endif
+
+SUBST_CLASSES+=                amavisd
+SUBST_STAGE.amavisd=   pre-build
+SUBST_FILES.amavisd=   ${WRKSRC}/amavisd ${WRKSRC}/amavisd.conf
+SUBST_SED.amavisd=     \
+       -e "s|/etc/amavisd.conf|${PKG_SYSCONFDIR}/amavisd.conf|"        \
+       -e "s|@AMAVIS_DIR@|${AMAVIS_DIR}|g"                             \
+       -e "s|@AMAVIS_USER@|${AMAVIS_USER}|g"                           \
+       -e "s|@AMAVIS_GROUP@|${AMAVIS_GROUP}|g"                         \
+       -e "s|@AMAVIS_QUARANTINE@|${AMAVIS_QUARANTINE}|g"               \
+       -e "s|@LOCALBASE@|${LOCALBASE}|g"                               \
+       -e "s|@PREFIX@|${PREFIX}|g"
+
+do-install:
+.if !empty(PKG_OPTIONS:Mmilter)
+       ${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis ${PREFIX}/sbin
+       ${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin
+.endif
+       ${INSTALL_SCRIPT} ${WRKSRC}/amavisd ${PREFIX}/sbin/amavisd
+       ${INSTALL_DATA_DIR} ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/AAAREADME.first ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/LDAP.schema ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/MANIFEST ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES ${DOCDIR}
+       for file in README_FILES/README.*; do                           \
+               ${INSTALL_DATA} ${WRKSRC}/$$file ${DOCDIR};             \
+       done
+       ${INSTALL_DATA_DIR} ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/amavisd.conf ${EGDIR}/amavisd.conf-minimal
+       ${INSTALL_DATA} ${WRKSRC}/amavisd.conf-default ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/amavisd.conf-sample ${EGDIR}
+
+.include "../../mk/bsd.pkg.mk"
diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/PLIST        Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,33 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/08/06 15:05:54 jlam Exp $
+${MILTER}sbin/amavis
+${MILTER}sbin/amavis-milter
+sbin/amavisd
+share/doc/amavisd-new/AAAREADME.first
+share/doc/amavisd-new/INSTALL
+share/doc/amavisd-new/LDAP.schema
+share/doc/amavisd-new/LICENSE
+share/doc/amavisd-new/MANIFEST
+share/doc/amavisd-new/README.chroot
+share/doc/amavisd-new/README.contributed
+share/doc/amavisd-new/README.courier
+share/doc/amavisd-new/README.customize
+share/doc/amavisd-new/README.exim_v3
+share/doc/amavisd-new/README.exim_v3_app
+share/doc/amavisd-new/README.exim_v4
+share/doc/amavisd-new/README.exim_v4_app
+share/doc/amavisd-new/README.exim_v4_app2
+share/doc/amavisd-new/README.lookups
+share/doc/amavisd-new/README.milter
+share/doc/amavisd-new/README.old.scanners
+share/doc/amavisd-new/README.performance
+share/doc/amavisd-new/README.policy-on-notifications
+share/doc/amavisd-new/README.postfix
+share/doc/amavisd-new/README.protocol
+share/doc/amavisd-new/README.sendmail
+share/doc/amavisd-new/README.sendmail-dual
+share/doc/amavisd-new/RELEASE_NOTES
+share/examples/amavisd-new/amavisd.conf-default
+share/examples/amavisd-new/amavisd.conf-minimal
+share/examples/amavisd-new/amavisd.conf-sample
+@dirrm share/examples/amavisd-new
+@dirrm share/doc/amavisd-new
diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/distinfo     Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/08/06 15:05:54 jlam Exp $
+
+SHA1 (amavisd-new-20040701.tar.gz) = 77c037cb13e629f5f2c038d56a62c1cdae904075
+Size (amavisd-new-20040701.tar.gz) = 451622 bytes
+SHA1 (patch-aa) = 4364b6501c0730b623c48afee6f24b6256c6b84f
diff -r de08c9587641 -r 9984aad5f131 security/amavisd-new/files/amavisd.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/amavisd-new/files/amavisd.sh     Fri Aug 06 15:05:53 2004 +0000
@@ -0,0 +1,77 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: amavisd.sh,v 1.1.1.1 2004/08/06 15:05:54 jlam Exp $
+#
+# PROVIDE: amavisd
+# REQUIRE: DAEMON
+# BEFORE:  mail
+#
+#
+# You will need to set some variables in /etc/rc.conf to start amavisd:
+#
+# amavisd=YES
+#
+# The following variables are optional:
+#
+#      amavisd_user="@AMAVIS_USER@"    # user to run amavisd as
+#      amavisd_group="@AMAVIS_GROUP@"  # ${amavisd_user}'s group
+#      amavisd_dirs="@AMAVIS_DIR@"     # directories that should be created
+#                                      # before starting amavisd
+
+if [ -f /etc/rc.subr ]; then
+       . /etc/rc.subr
+fi
+
+name="amavisd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+command_interpreter="@PERL5@"
+pidfile="@AMAVIS_DIR@/amavisd.pid"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+: ${amavisd_user="@AMAVIS_USER@"}
+: ${amavisd_group="@AMAVIS_GROUP@"}
+: ${amavisd_dirs="@AMAVIS_DIR@ @AMAVIS_DIR@/db @AMAVIS_DIR@/tmp @AMAVIS_QUARANTINE@"}
+
+start_precmd="amavisd_prestart"
+stop_cmd="amavisd_stop"
+
+amavisd_prestart()
+{
+       @RM@ -f @AMAVIS_DIR@/amavisd.sock
+       for dir in ${amavisd_dirs}; do
+               @MKDIR@ $dir
+               @CHOWN@ ${amavisd_user}:${amavisd_group} $dir
+               @CHMOD@ 0750 $dir



Home | Main Index | Thread Index | Old Index