diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile index 894d7dd72cae..59dd074058b6 100644 --- a/security/amavisd-new/Makefile +++ b/security/amavisd-new/Makefile @@ -1,265 +1,259 @@ # New ports collection makefile for: amavisd-new # Date created: 05 Jun 2002 # Whom: Christopher K Davis (ckd-freebsd@ckdhr.com) # # $FreeBSD$ # # Based on amavisd ports makefile. PORTNAME= amavisd-new -PORTVERSION= 2.4.2 -PORTREVISION= 4 +PORTVERSION= 2.4.3 PORTEPOCH= 1 CATEGORIES= security MASTER_SITES= http://www.ijs.si/software/amavisd/ \ http://mirrors.catpipe.net/amavisd-new/ \ http://mirror.mainloop.se/amavisd/ DISTNAME= ${PORTNAME}-${PORTVERSION:S/.p/-p/} MAINTAINER= gkovesdan@t-hosting.hu COMMENT= Performance-enhanced daemonized version of amavis-perl RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \ ${SITE_PERL}/MIME/Parser.pm:${PORTSDIR}/mail/p5-MIME-Tools \ ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \ ${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \ ${SITE_PERL}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \ ${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \ ${SITE_PERL}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar \ ${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \ ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ ${SITE_PERL}/IO/Wrap.pm:${PORTSDIR}/devel/p5-IO-stringy \ ${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \ ${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server USE_PERL5_RUN= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-user=${AMAVISUSER} --with-runtime-dir=${AMAVISDIR} CONFIGURE_WRKSRC= ${WRKSRC}/helper-progs BUILD_WRKSRC= ${WRKSRC}/helper-progs AMAVISUSER?= vscan AMAVISGROUP?= vscan AMAVISDIR?= /var/amavis AMAVISQUARANTINE?= /var/virusmails WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//} OPTIONS= BDB "Use BerkeleyDB for nanny/cache/snmp" on \ - SQLITE "Use SQLite for lookups/logging/quarantine" off \ + SQLITE "Use SQLite for lookups" off \ MYSQL "Use MySQL for lookups/logging/quarantine" off \ PGSQL "Use PgSQL for lookups/logging/quarantine" off \ LDAP "Use LDAP for lookups" off \ SASL "Use SASL authentication" off \ MILTER "Sendmail milter support" on \ - NEW_MILTER "New sendmail milter support (external module)" off \ SPAMASSASSIN "Use mail/p5-Mail-SpamAssassin" on \ P0F "Passive operating system fingerprinting" off \ FILE "Use newer file(1) utility from ports" off \ RAR "RAR support with archivers/rar" off \ UNRAR "RAR support with archivers/unrar" on \ ARJ "ARJ support with archivers/arj" on \ UNARJ "ARJ support with archivers/unarj" off \ LHA "LHA support with archivers/lha" on \ ARC "ARC support with archivers/arc" on \ NOMARCH "ARC support with archivers/nomarch" off \ CAB "CAB support with archivers/cabextract" on \ RPM "RPM support with archivers/rpm2cpio" on \ ZOO "ZOO support with archivers/zoo" on \ UNZOO "ZOO support with archivers/unzoo" off \ LZOP "LZOP support with archivers/lzop" on \ FREEZE "FREEZE support with archivers/freeze" on \ TNEF "Add external tnef decoder converters/tnef" off SUB_FILES= pkg-install pkg-deinstall pkg-message SUB_LIST+= AMAVISUSER=${AMAVISUSER} \ AMAVISGROUP=${AMAVISGROUP} \ AMAVISDIR=${AMAVISDIR} \ AMAVISQUARANTINE=${AMAVISQUARANTINE} PLIST_SUB+= AMAVIS_NOAMAVIS=${AMAVIS_NOAMAVIS} \ AMAVIS_NOMILTER=${AMAVIS_NOMILTER} \ AMAVIS_NOP0F=${AMAVIS_NOP0F} .include USE_RC_SUBR+= amavisd.sh .if !defined(WITH_MILTER) || (!exists(/usr/lib/libmilter.a) && !exists(${PREFIX}/lib/libmilter.a)) AMAVIS_NOAMAVIS="@comment " .endif .if defined(WITH_MILTER) && !defined(AMAVIS_NOAMAVIS) USE_RC_SUBR+= amavis-milter.sh .else AMAVIS_NOMILTER="@comment " .endif .if defined(WITH_BDB) RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB .endif .if defined(WITH_SQLITE) RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite .endif .if defined(WITH_MYSQL) RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql .endif .if defined(WITH_PGSQL) RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg .endif .if defined(WITH_LDAP) RUN_DEPENDS+= ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap .endif .if defined(WITH_SASL) RUN_DEPENDS+= ${SITE_PERL}/Authen/SASL.pm:${PORTSDIR}/security/p5-Authen-SASL .endif -.if defined(WITH_NEW_MILTER) -RUN_DEPENDS+= ${LOCALBASE}/sbin/amavisd-milter:${PORTSDIR}/security/amavisd-milter -.endif - .if defined(WITH_SPAMASSASSIN) RUN_DEPENDS+= ${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin .endif .if defined(WITH_P0F) RUN_DEPENDS+= ${LOCALBASE}/bin/p0f:${PORTSDIR}/net-mgmt/p0f USE_RC_SUBR+= amavis-p0fanalyzer.sh .else AMAVIS_NOP0F= "@comment " .endif .if defined(WITH_FILE) RUN_DEPENDS+= ${LOCALBASE}/bin/file:${PORTSDIR}/sysutils/file .endif .if defined(WITH_RAR) RUN_DEPENDS+= ${LOCALBASE}/bin/rar:${PORTSDIR}/archivers/rar .endif .if defined(WITH_UNRAR) RUN_DEPENDS+= ${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar .endif .if defined(WITH_ARJ) RUN_DEPENDS+= ${LOCALBASE}/bin/arj:${PORTSDIR}/archivers/arj .endif .if defined(WITH_UNARJ) RUN_DEPENDS+= ${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj .endif .if defined(WITH_LHA) RUN_DEPENDS+= ${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha .endif .if defined(WITH_ARC) RUN_DEPENDS+= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc .endif .if defined(WITH_NOMARCH) RUN_DEPENDS+= ${LOCALBASE}/bin/nomarch:${PORTSDIR}/archivers/nomarch .endif .if defined(WITH_CAB) RUN_DEPENDS+= ${LOCALBASE}/bin/cabextract:${PORTSDIR}/archivers/cabextract .endif .if defined(WITH_RPM) RUN_DEPENDS+= ${LOCALBASE}/bin/rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio .endif .if defined(WITH_ZOO) RUN_DEPENDS+= ${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo .endif .if defined(WITH_UNZOO) RUN_DEPENDS+= ${LOCALBASE}/bin/unzoo:${PORTSDIR}/archivers/unzoo .endif .if defined(WITH_LZOP) RUN_DEPENDS+= ${LOCALBASE}/bin/lzop:${PORTSDIR}/archivers/lzop .endif .if defined(WITH_FREEZE) RUN_DEPENDS+= ${LOCALBASE}/bin/unfreeze:${PORTSDIR}/archivers/freeze .endif .if defined(WITH_TNEF) RUN_DEPENDS+= ${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef .endif post-patch: .for f in amavisd.conf amavisd.conf-sample amavisd amavisd-agent amavisd-nanny amavisd-release @${REINPLACE_CMD} "s@'zoo'\]@['zoo','unzoo'] ]@" ${WRKSRC}/${f} .endfor .for i in amavisd.conf amavisd.conf-sample @${REINPLACE_CMD} -e "s|$daemon_user = \'vscan\';|$daemon_user = \'${AMAVISUSER}\';|" \ -e "s|$daemon_group = \'vscan\';|$daemon_group = \'${AMAVISGROUP}\';|" \ -e "s|/var/amavis|${AMAVISDIR}|" \ -e "s|/var/lib/amavis|${AMAVISDIR}|" \ -e 's|$$log_level = 2;|$$log_level = 0;|' \ -e "s|/var/virusmails|${AMAVISQUARANTINE}|" \ ${WRKSRC}/${i} .endfor @${REINPLACE_CMD} "s|/var/amavis/db|${AMAVISDIR}/db|" ${WRKSRC}/amavisd-agent @${REINPLACE_CMD} "s|/var/amavis/db|${AMAVISDIR}/db|" ${WRKSRC}/amavisd-nanny @${REINPLACE_CMD} "s|#define HAVE_MKTEMP|#undef HAVE_MKTEMP|" \ ${WRKSRC}/helper-progs/config.h.in @${REINPLACE_CMD} "s|/etc/amavisd.conf|${PREFIX}/etc/amavisd.conf|" \ ${WRKSRC}/amavisd .if defined(AMAVIS_NOAMAVIS) do-configure: do-build: @${ECHO} libmilter not available, not building amavis-milter and amavis .endif pre-install: @${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL do-install: .if !defined(AMAVIS_NOAMAVIS) ${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis ${PREFIX}/sbin .endif .if !defined(AMAVIS_NOMILTER) ${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin .endif .if defined(WITH_P0F) ${INSTALL_SCRIPT} ${WRKSRC}/p0f-analyzer.pl ${PREFIX}/sbin .endif .for i in amavisd amavisd-agent amavisd-nanny amavisd-release ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/sbin .endfor ${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist ${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-sample ${PREFIX}/etc/amavisd.conf-sample ${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${PREFIX}/etc/amavisd.conf-default .if !exists(${PREFIX}/etc/amavisd.conf) # # This can contain sensitive information, e.g. SQL passwords, so it should be handled # with care. # ${INSTALL} -o root -g ${AMAVISGROUP} -m 640 ${WRKSRC}/amavisd.conf ${PREFIX}/etc .endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for i in AAAREADME.first INSTALL LDAP.schema LICENSE RELEASE_NOTES README_FILES/* ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} .endfor .endif post-install: @${CAT} ${PKGMESSAGE} .if ${PERL_LEVEL} < 500802 IGNORE= requires perl 5.8.2 or higher .endif .include diff --git a/security/amavisd-new/distinfo b/security/amavisd-new/distinfo index f527b232c1d7..828ccb490596 100644 --- a/security/amavisd-new/distinfo +++ b/security/amavisd-new/distinfo @@ -1,3 +1,3 @@ -MD5 (amavisd-new-2.4.2.tar.gz) = d750176de7481498ebd1011e08a488da -SHA256 (amavisd-new-2.4.2.tar.gz) = 80023cc0397560d082dd4152c96b7efc49d3cc2695b4d578ed01b08c3af2bb9a -SIZE (amavisd-new-2.4.2.tar.gz) = 854326 +MD5 (amavisd-new-2.4.3.tar.gz) = ee46a93edc1507a291ac0d1ff43a1d54 +SHA256 (amavisd-new-2.4.3.tar.gz) = 353f04a3f097bb3246707599187e50fe852ce6d6f7337c923cd5b55a0c0466cd +SIZE (amavisd-new-2.4.3.tar.gz) = 876584 diff --git a/security/amavisd-new/files/amavis-p0fanalyzer.sh.in b/security/amavisd-new/files/amavis-p0fanalyzer.sh.in index c5dc8bdeebec..97a9f16ae6de 100644 --- a/security/amavisd-new/files/amavis-p0fanalyzer.sh.in +++ b/security/amavisd-new/files/amavis-p0fanalyzer.sh.in @@ -1,37 +1,38 @@ #!/bin/sh # $FreeBSD$ # PROVIDE: amavis_p0fanalyzer # REQUIRE: DAEMON # BEFORE: amavisd # KEYWORD: FreeBSD amavis_p0fanalyzer_enable="${amavis_p0fanalyzer_enable-NO}" amavis_p0fanalyzer_p0f_filter="${amavis_p0fanalyzer_p0f_filter-"tcp dst port 25"}" amavis_p0fanalyzer_pidfile1="${amavis_p0fanalyzer_pidfile1-/var/run/p0fanalyzer1.pid}" amavis_p0fanalyzer_pidfile2="${amavis_p0fanalyzer_pidfile2-/var/run/p0fanalyzer2.pid}" +amavis_p0fanalyzer_flags="${amavis_p0fanalyzer_flags-2345}" . /etc/rc.subr name="amavis_p0fanalyzer" rcvar=`set_rcvar` start_cmd=p0fanalyzer_start stop_cmd=p0fanalyzer_stop p0fanalyzer_start() { echo "Starting p0f-analyzer." && \ /usr/sbin/daemon -p ${amavis_p0fanalyzer_pidfile1} \ - %%PREFIX%%/bin/p0f -l "${amavis_p0fanalyzer_p0f_filter}" \ - "${amavis_p0fanalyzer_flags}" 2>&1 | \ + %%PREFIX%%/bin/p0f "${amavis_p0f_daemon_flags}" \ + -l "${amavis_p0fanalyzer_p0f_filter}" 2>&1 | \ /usr/sbin/daemon -p ${amavis_p0fanalyzer_pidfile2} \ - %%PREFIX%%/sbin/p0f-analyzer.pl 2345 + %%PREFIX%%/sbin/p0f-analyzer.pl ${amavis_p0fanalyzer_flags} } p0fanalyzer_stop() { /bin/kill `cat ${amavis_p0fanalyzer_pidfile2}` && rm ${amavis_p0fanalyzer_pidfile2} /bin/kill `cat ${amavis_p0fanalyzer_pidfile1}` && rm ${amavis_p0fanalyzer_pidfile1} } load_rc_config $name run_rc_command "$1" diff --git a/security/amavisd-new/files/patch-amavisd b/security/amavisd-new/files/patch-amavisd index 22cf6d322974..e69de29bb2d1 100644 --- a/security/amavisd-new/files/patch-amavisd +++ b/security/amavisd-new/files/patch-amavisd @@ -1,40 +0,0 @@ ---- amavisd.old Fri Aug 18 13:01:43 2006 -+++ amavisd Fri Aug 18 13:01:51 2006 -@@ -12049,15 +12049,20 @@ - my($bounced) = $msginfo->dsn_sent; - for my $r (@{$msginfo->per_recip_data}) { - my($resp) = $r->recip_smtp_response; -- if ($bounced && $smtp_resp=~/^2/ && $resp!~/^2/) { -- # as the message was already bounced by us, -- # MTA must not bounce it again; failure status -- # needs to be converted into success! -- $resp = sprintf("250 2.5.0 Ok %s, DSN %s (%s)", -- $r->recip_addr, $bounced==1 ? 'sent' : 'muted', $resp); -+ my($recip_quoted) = qquote_rfc2821_local($r->recip_addr); -+ if ($resp=~/^2/) { -+ # success, no need to change status -+ } elsif ($bounced) { -+ # a non-delivery notifications was already sent by us, so -+ # MTA must not bounce it again; turn status into a success -+ $resp = sprintf("250 2.5.0 Ok %s, DSN was sent (%s)", -+ $recip_quoted, $resp); -+ } elsif ($resp=~/^5/ && $r->recip_destiny != D_REJECT) { -+ $resp = sprintf("250 2.5.0 Ok %s, DSN suppressed (%s)", -+ $recip_quoted, $resp); - } -- do_log(4, 'sending LMTP response for <%s>: "%s"', -- $r->recip_addr, $resp); -+ do_log(4, 'sending LMTP response for %s: "%s"', -+ $recip_quoted, $resp); - $self->smtp_resp(0, $resp); - } - } -@@ -15055,6 +15060,8 @@ - local_tests_only => $sa_local_tests_only, - home_dir_for_helpers => $helpers_home, - stop_at_threshold => 0, -+ LOCAL_STATE_DIR => '/var/lib', -+ PREFIX => '/usr/local', - # DEF_RULES_DIR => '/usr/local/share/spamassassin', - # LOCAL_RULES_DIR => '/etc/mail/spamassassin', - #see man Mail::SpamAssassin for other options diff --git a/security/amavisd-new/files/pkg-message.in b/security/amavisd-new/files/pkg-message.in index efcf16568533..dae402695c37 100644 --- a/security/amavisd-new/files/pkg-message.in +++ b/security/amavisd-new/files/pkg-message.in @@ -1,35 +1,36 @@ ******************************************************************* To use amavisd-new, you need to install at least one virus scanner. The following virus scanners are available in the FreeBSD ports collection: /usr/ports/security/vscan McAfee VirusScan /usr/ports/security/clamav Clam Antivirus /usr/ports/security/f-prot F-Prot Antivirus /usr/ports/security/drweb DrWeb antivirus suite Enable amavisd-new in /etc/rc.conf with the following line: amavisd_enable="YES" If you have installed and want to use the amavis sendmail milter interface, you need the following additional line in /etc/rc.conf: amavis_milter_enable="YES" If you have installed and want to use the p0fanalyzer interface, you need the following additional lines in /etc/rc.conf (with modifications according to your needs): amavis_p0fanalyzer_enable="YES" amavis_p0fanalyzer_p0f_filter="tcp dst port 25" - You can pass another command line options to p0fanalyzer by setting + You can pass another command line options to p0f daemon by setting + amavis_p0f_daemon_flags and to p0f-analyzer.pl by setting amavis_p0fanalyzer_flags. Configuration templates are available in %%PREFIX%%/etc as amavisd.conf-dist, amavisd.conf-sample and amavisd.conf-default. Documentation is available in %%DOCSDIR%%. *******************************************************************