From owner-freebsd-ports Fri Dec 14 21:40:11 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8590A37B405 for ; Fri, 14 Dec 2001 21:40:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBF5e3n72374; Fri, 14 Dec 2001 21:40:03 -0800 (PST) (envelope-from gnats) Date: Fri, 14 Dec 2001 21:40:03 -0800 (PST) Message-Id: <200112150540.fBF5e3n72374@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: TAKEMURA Masahiro Subject: Re: ports/32471: amavis-perl only usable for sendmail Reply-To: TAKEMURA Masahiro Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/32471; it has been noted by GNATS. From: TAKEMURA Masahiro To: freebsd-gnats-submit@FreeBSD.org, martijn@ietsvaags.xs Cc: Subject: Re: ports/32471: amavis-perl only usable for sendmail Date: Sat, 15 Dec 2001 14:39:50 +0900 (JST) I update postfix support. following patch is diff to $FreeBSD: ports/security/amavis-perl/Makefile,v 1.5 2001/10/21 18:47:20 dwcjr Exp $ -- TAKEMURA Masahiro : mastake@msel.t.u-tokyo.ac.jp diff -urP amavis-perl.orig/Makefile amavis-perl/Makefile --- amavis-perl.orig/Makefile Mon Oct 22 03:47:20 2001 +++ amavis-perl/Makefile Sat Dec 15 13:29:55 2001 @@ -50,7 +50,18 @@ RUN_DEPENDS= ${BUILD_DEPENDS} .endif -.if !defined(MTA) +.if defined(MTA) +.if ${MTA} == "postfix" +DIROWNER?= vscan:daemon +CONFIGURE_ARGS+= --enable-postfix --enable-smtp +BUILD_DEPENDS+= ${LOCALBASE}/sbin/postfix:${PORTSDIR}/mail/postfix +.elif ${MTA} == "exim" +DIROWNER?= root:daemon +CONFIGURE_ARGS+= --enable-exim +BUILD_DEPENDS+= ${LOCALBASE}/sbin/exim:${PORTSDIR}/mail/exim +.endif +RUN_DEPENDS= ${BUILD_DEPENDS} +.else MTA?= sendmail DIROWNER?= root:daemon CONFIGURE_ARGS+= --enable-relay @@ -58,6 +69,7 @@ PKGDEINSTALL= ${PKGDIR}/pkg-deinstall.${MTA} PKGINSTALL= ${PKGDIR}/pkg-install.${MTA} +PKGMESSAGE= ${PKGDIR}/pkg-message.${MTA} do-install: @${MKDIR} /var/log/amavis @@ -71,9 +83,9 @@ .endif post-install: + @PKG_PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} _ POST-INSTALL @${CHOWN} ${DIROWNER} /var/log/amavis /var/spool/quarantine @${CHMOD} 0755 /var/log/amavis /var/spool/quarantine - @PKG_PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} _ POST-INSTALL - @${CAT} ${PKGMESSAGE}.${MTA} + @${CAT} ${PKGMESSAGE} .include diff -urP amavis-perl.orig/pkg-install.postfix amavis-perl/pkg-install.postfix --- amavis-perl.orig/pkg-install.postfix Thu Jan 1 09:00:00 1970 +++ amavis-perl/pkg-install.postfix Sat Dec 15 12:48:39 2001 @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +$user=vscan; +$group=nogroup; + +if (`grep ^vscan: /etc/passwd` eq "") { + print "You need a user \"${user}\".\n"; + if (yesno("Would you like me to create it", "y")) { + system ("/usr/sbin/pw useradd ${user} -g ${group} -h - -d /nonexistent -s /nonexistent -c \"AMaViS Virus Scanner\" || exit"); + print "Done.\n"; + } else { + print "Please create it, and try again.\n"; + exit 1; + }; +} else { + print "You already have a user \"${user}\", so I will use it.\n"; +}; + +sub yesno() { + my ($mes, $def) = @_; + print "$mes [$def]? "; + $answer = ; + chomp($answer); + if ($answer eq "") { + $answer = "y"; + }; + if ($answer=~/^y/i) { + return 1; + }; + return 0; +}; diff -urP amavis-perl.orig/pkg-message.postfix amavis-perl/pkg-message.postfix --- amavis-perl.orig/pkg-message.postfix Thu Jan 1 09:00:00 1970 +++ amavis-perl/pkg-message.postfix Sat Dec 15 12:50:20 2001 @@ -0,0 +1,22 @@ + +Please read documentation on http://www.amavis.org/ before you start using it. + + To configure postfix, you have to do later: + + * add + + content_filter = vscan: + + to /usr/local/etc/postfix/main.cf + + * add + + vscan unix - n n - 10 pipe user-vscan + argv=/usr/local/sbin/amavis ${sender} ${recipient} + localhost:10025 inet n - n - - smtpd + -o content_filter= + + to /etc/postfix/master.cf. + +Please read /usr/local/share/doc/amavis/README.postfix for further information + To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message