Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2001 21:40:03 -0800 (PST)
From:      TAKEMURA Masahiro <mastake@msel.t.u-tokyo.ac.jp>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/32471: amavis-perl only usable for sendmail
Message-ID:  <200112150540.fBF5e3n72374@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/32471; it has been noted by GNATS.

From: TAKEMURA Masahiro <mastake@msel.t.u-tokyo.ac.jp>
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 <bsd.port.mk>
 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 = <STDIN>;
 +	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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112150540.fBF5e3n72374>