- update to 3.1.0

Note: Razor is disabled by default in this version. Please read the license
      and decide if you are able to re-enable it (in OPTIONS).
      http://razor.sourceforge.net/docs/doc.php?type=text&name=SERVICE_POLICY

      DomainKeys support added, and is disabled by default, too.
      You may enable it by using OPTIONS.
This commit is contained in:
Yen-Ming Lee 2005-09-17 15:05:19 +00:00
parent 8a75bddbee
commit b64085b4c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=143007
5 changed files with 97 additions and 55 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= Mail-SpamAssassin
PORTVERSION= 3.0.4
PORTVERSION= 3.1.0
CATEGORIES= mail perl5
MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
MASTER_SITE_SUBDIR= spamassassin/source/:apache Mail/:cpan
@ -27,10 +27,11 @@ CONFIGURE_ARGS= SYSCONFDIR="${PREFIX}/etc" \
BUILD_SPAMC=yes RUN_NET_TESTS=yes
OPTIONS= AS_ROOT "Run spamd as root (recommended)" on \
DOMAINKEYS "DomainKeys support" off \
SSL "Build with SSL support for spamd/spamc" on \
MYSQL "Add MySQL support" off \
PGSQL "Add PostreSQL support" off \
RAZOR "Add Vipul's Razor support" on \
RAZOR "Add Vipul's Razor support" off \
SPF_QUERY "Add SPF query support" off \
TOOLS "Install SpamAssassin tools" off
@ -53,18 +54,20 @@ CONFIGURE_ARGS+= ENABLE_SSL=no
.if defined(WITH_MYSQL)
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
USE_SQLDB= yes
.endif
.if defined(WITH_PGSQL)
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
USE_SQLDB= yes
.endif
.if !defined(WITHOUT_RAZOR)
.if defined(WITH_RAZOR)
RUN_DEPENDS+= razor-client:${PORTSDIR}/mail/razor-agents
.endif
.if defined(WITH_DOMAINKEYS)
RUN_DEPENDS+= ${SITE_PERL}/Mail/DomainKeys.pm:${PORTSDIR}/mail/p5-Mail-DomainKeys
.endif
.if defined(WITH_TOOLS)
RUN_DEPENDS+= ${SITE_PERL}/Parse/Syslog.pm:${PORTSDIR}/textproc/p5-Parse-Syslog \
${SITE_PERL}/Date/Manip.pm:${PORTSDIR}/devel/p5-Date-Manip \
@ -79,11 +82,19 @@ MAN3= Mail::SpamAssassin.3 \
Mail::SpamAssassin::AutoWhitelist.3 \
Mail::SpamAssassin::Bayes.3 \
Mail::SpamAssassin::BayesStore.3 \
Mail::SpamAssassin::BayesStore::MySQL.3 \
Mail::SpamAssassin::BayesStore::PgSQL.3 \
Mail::SpamAssassin::BayesStore::SQL.3 \
Mail::SpamAssassin::Client.3 \
Mail::SpamAssassin::Conf.3 \
Mail::SpamAssassin::Conf::LDAP.3 \
Mail::SpamAssassin::Conf::Parser.3 \
Mail::SpamAssassin::Conf::SQL.3 \
Mail::SpamAssassin::DnsResolver.3 \
Mail::SpamAssassin::Logger.3 \
Mail::SpamAssassin::Logger::File.3 \
Mail::SpamAssassin::Logger::Stderr.3 \
Mail::SpamAssassin::Logger::Syslog.3 \
Mail::SpamAssassin::Message.3 \
Mail::SpamAssassin::Message::Metadata.3 \
Mail::SpamAssassin::Message::Node.3 \
@ -91,14 +102,33 @@ MAN3= Mail::SpamAssassin.3 \
Mail::SpamAssassin::PerMsgStatus.3 \
Mail::SpamAssassin::PersistentAddrList.3 \
Mail::SpamAssassin::Plugin.3 \
Mail::SpamAssassin::Plugin::AWL.3 \
Mail::SpamAssassin::Plugin::AccessDB.3 \
Mail::SpamAssassin::Plugin::AntiVirus.3 \
Mail::SpamAssassin::Plugin::AutoLearnThreshold.3 \
Mail::SpamAssassin::Plugin::DCC.3 \
Mail::SpamAssassin::Plugin::DomainKeys.3 \
Mail::SpamAssassin::Plugin::Hashcash.3 \
Mail::SpamAssassin::Plugin::MIMEHeader.3 \
Mail::SpamAssassin::Plugin::Pyzor.3 \
Mail::SpamAssassin::Plugin::Razor2.3 \
Mail::SpamAssassin::Plugin::RelayCountry.3 \
Mail::SpamAssassin::Plugin::ReplaceTags.3 \
Mail::SpamAssassin::Plugin::SPF.3 \
Mail::SpamAssassin::Plugin::SpamCop.3 \
Mail::SpamAssassin::Plugin::Test.3 \
Mail::SpamAssassin::Plugin::TextCat.3 \
Mail::SpamAssassin::Plugin::URIDNSBL.3 \
Mail::SpamAssassin::Plugin::WhiteListSubject.3 \
Mail::SpamAssassin::PluginHandler.3 \
Mail::SpamAssassin::SQLBasedAddrList.3
Mail::SpamAssassin::SQLBasedAddrList.3 \
Mail::SpamAssassin::SubProcBackChannel.3 \
Mail::SpamAssassin::Util.3 \
Mail::SpamAssassin::Util::Progress.3 \
spamassassin-run.3
MAN1= spamd.1 spamassassin.1 spamc.1 sa-learn.1
MAN1= spamd.1 spamassassin.1 spamc.1 sa-learn.1 sa-update.1 \
spamassassin-run.1
PLIST_SUB+= TOOLS=${TOOLS}
@ -113,7 +143,7 @@ PORTDOCS= ${DOCS} sql contrib ldap
USE_RC_SUBR= yes
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%RC_SUBR%%|${RC_SUBR}|g'
.if defined(USE_SQLDB)
.if defined(WITH_MYSQL) || defined(WITH_PGSQL)
SED_SCRIPT+= -e 's|%%SQL_FLAG%%|-Q|g'
.else
SED_SCRIPT+= -e 's|%%SQL_FLAG%%||g'
@ -126,11 +156,16 @@ SED_SCRIPT+= -e 's|%%RUN_AS_USER%%||g'
post-patch:
@${FIND} ${WRKSRC} -name \*.orig -delete
@${SED} -e 's#B_CONFDIR)/local.cf#B_CONFDIR)/local.cf.sample#g' \
@${REINPLACE_CMD} -e 's#B_CONFDIR)/local.cf#B_CONFDIR)/local.cf.sample#g' \
-e 's#B_CONFDIR)/init.pre#B_CONFDIR)/init.pre.sample#g' \
-e 's/require DBI/0/' \
${WRKSRC}/Makefile.PL > ${WRKSRC}/Makefile.PL.sed
@${MV} ${WRKSRC}/Makefile.PL.sed ${WRKSRC}/Makefile.PL
${WRKSRC}/Makefile.PL
.if defined(WITH_RAZOR)
${REINPLACE_CMD} -e '/Razor2/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v310.pre
.endif
.if defined(WITH_DOMAINKEYS)
${REINPLACE_CMD} -e '/DomainKeys/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v310.pre
.endif
post-build:
@${SED} ${SED_SCRIPT} ${FILESDIR}/spamd.sh > ${WRKDIR}/sa-spamd.sh

View File

@ -1,2 +1,2 @@
MD5 (Mail-SpamAssassin-3.0.4.tar.gz) = 51926fe5aabaf57eed2c09061fe8fb02
SIZE (Mail-SpamAssassin-3.0.4.tar.gz) = 1001430
MD5 (Mail-SpamAssassin-3.1.0.tar.gz) = f70c1fcab3d9563731bbc307eda7d69e
SIZE (Mail-SpamAssassin-3.1.0.tar.gz) = 1185499

View File

@ -1,19 +0,0 @@
--- sa-learn.raw~ Fri Aug 27 18:37:32 2004
+++ sa-learn.raw Wed Sep 22 18:02:48 2004
@@ -106,6 +106,7 @@
'local|L' => \$opt{'local'},
'no-sync|nosync' => \$opt{'nosync'},
'showdots' => \$opt{'showdots'},
+ 'quiet' => \$opt{'quiet'},
'use-ignores' => \$opt{'use-ignores'},
'no-rebuild|norebuild' => sub { $opt{'nosync'} = 1; warn "The --no-rebuild option has been deprecated. Please use --no-sync instead.\n" },
@@ -384,7 +385,7 @@
print STDERR "\n" if ( $opt{showdots} );
print
-"Learned from $learnedcount message(s) ($messagecount message(s) examined).\n";
+"Learned from $learnedcount message(s) ($messagecount message(s) examined).\n" unless $opt{quiet};
# If we needed to make a tempfile, go delete it.
if ( defined $tempfile ) {

View File

@ -1,22 +0,0 @@
--- spamd/spamd.raw.orig Fri May 6 20:16:50 2005
+++ spamd/spamd.raw Fri May 6 20:17:30 2005
@@ -881,12 +881,14 @@
}
# if we changed UID during processing, change back!
- if ( $> != $< and $> != ( $< - 2**32 ) ) {
- $) = "$( $("; # change eGID
- $> = $<; # change eUID
+ if($setuid_to_user) {
if ( $> != $< and $> != ( $< - 2**32 ) ) {
- logmsg("fatal: return setuid failed");
- die; # make it fatal to avoid security breaches
+ $) = "$( $("; # change eGID
+ $> = $<; # change eUID
+ if ( $> != $< and $> != ( $< - 2**32 ) ) {
+ logmsg("fatal: return setuid failed");
+ die; # make it fatal to avoid security breaches
+ }
}
}

View File

@ -1,5 +1,6 @@
@unexec %D/etc/rc.d/sa-spamd.sh stop > /dev/null 2>&1 || true
bin/sa-learn
bin/sa-update
bin/spamassassin
bin/spamc
bin/spamd
@ -7,14 +8,21 @@ etc/mail/spamassassin/local.cf.sample
@unexec if cmp -s %B/init.pre.sample %B/init.pre; then rm -f %B/init.pre; fi
etc/mail/spamassassin/init.pre.sample
@exec [ -f %B/init.pre ] || cp %B/%f %B/init.pre
etc/mail/spamassassin/v310.pre
etc/rc.d/sa-spamd.sh
%%SITE_PERL%%/Mail/SpamAssassin.pm
%%SITE_PERL%%/Mail/SpamAssassin/ArchiveIterator.pm
%%SITE_PERL%%/Mail/SpamAssassin/AutoWhitelist.pm
%%SITE_PERL%%/Mail/SpamAssassin/Bayes.pm
%%SITE_PERL%%/Mail/SpamAssassin/Bayes/CombineChi.pm
%%SITE_PERL%%/Mail/SpamAssassin/Bayes/CombineNaiveBayes.pm
%%SITE_PERL%%/Mail/SpamAssassin/BayesStore.pm
%%SITE_PERL%%/Mail/SpamAssassin/BayesStore/DBM.pm
%%SITE_PERL%%/Mail/SpamAssassin/BayesStore/MySQL.pm
%%SITE_PERL%%/Mail/SpamAssassin/BayesStore/PgSQL.pm
%%SITE_PERL%%/Mail/SpamAssassin/BayesStore/SDBM.pm
%%SITE_PERL%%/Mail/SpamAssassin/BayesStore/SQL.pm
%%SITE_PERL%%/Mail/SpamAssassin/Client.pm
%%SITE_PERL%%/Mail/SpamAssassin/Conf.pm
%%SITE_PERL%%/Mail/SpamAssassin/Conf/LDAP.pm
%%SITE_PERL%%/Mail/SpamAssassin/Conf/Parser.pm
@ -22,6 +30,7 @@ etc/rc.d/sa-spamd.sh
%%SITE_PERL%%/Mail/SpamAssassin/Constants.pm
%%SITE_PERL%%/Mail/SpamAssassin/DBBasedAddrList.pm
%%SITE_PERL%%/Mail/SpamAssassin/Dns.pm
%%SITE_PERL%%/Mail/SpamAssassin/DnsResolver.pm
%%SITE_PERL%%/Mail/SpamAssassin/EvalTests.pm
%%SITE_PERL%%/Mail/SpamAssassin/HTML.pm
%%SITE_PERL%%/Mail/SpamAssassin/Locales.pm
@ -29,6 +38,10 @@ etc/rc.d/sa-spamd.sh
%%SITE_PERL%%/Mail/SpamAssassin/Locker/Flock.pm
%%SITE_PERL%%/Mail/SpamAssassin/Locker/UnixNFSSafe.pm
%%SITE_PERL%%/Mail/SpamAssassin/Locker/Win32.pm
%%SITE_PERL%%/Mail/SpamAssassin/Logger.pm
%%SITE_PERL%%/Mail/SpamAssassin/Logger/File.pm
%%SITE_PERL%%/Mail/SpamAssassin/Logger/Stderr.pm
%%SITE_PERL%%/Mail/SpamAssassin/Logger/Syslog.pm
%%SITE_PERL%%/Mail/SpamAssassin/MailingList.pm
%%SITE_PERL%%/Mail/SpamAssassin/Message.pm
%%SITE_PERL%%/Mail/SpamAssassin/Message/Metadata.pm
@ -39,19 +52,37 @@ etc/rc.d/sa-spamd.sh
%%SITE_PERL%%/Mail/SpamAssassin/PerMsgStatus.pm
%%SITE_PERL%%/Mail/SpamAssassin/PersistentAddrList.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/AWL.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/AccessDB.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/AntiVirus.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/DCC.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/DomainKeys.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/Hashcash.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/MIMEHeader.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/Pyzor.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/Razor2.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/RelayCountry.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/ReplaceTags.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/SPF.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/SpamCop.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/Test.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/TextCat.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/URIDNSBL.pm
%%SITE_PERL%%/Mail/SpamAssassin/Plugin/WhiteListSubject.pm
%%SITE_PERL%%/Mail/SpamAssassin/PluginHandler.pm
%%SITE_PERL%%/Mail/SpamAssassin/Reporter.pm
%%SITE_PERL%%/Mail/SpamAssassin/SQLBasedAddrList.pm
%%SITE_PERL%%/Mail/SpamAssassin/TextCat.pm
%%SITE_PERL%%/Mail/SpamAssassin/SpamdForkScaling.pm
%%SITE_PERL%%/Mail/SpamAssassin/SubProcBackChannel.pm
%%SITE_PERL%%/Mail/SpamAssassin/Util.pm
%%SITE_PERL%%/Mail/SpamAssassin/Util/DependencyInfo.pm
%%SITE_PERL%%/Mail/SpamAssassin/Util/Progress.pm
%%SITE_PERL%%/Mail/SpamAssassin/Util/RegistrarBoundaries.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin/.packlist
%%SITE_PERL%%/spamassassin-run.pod
%%DATADIR%%/10_misc.cf
%%DATADIR%%/20_advance_fee.cf
%%DATADIR%%/20_anti_ratware.cf
%%DATADIR%%/20_body_tests.cf
%%DATADIR%%/20_compensate.cf
@ -61,21 +92,36 @@ etc/rc.d/sa-spamd.sh
%%DATADIR%%/20_head_tests.cf
%%DATADIR%%/20_html_tests.cf
%%DATADIR%%/20_meta_tests.cf
%%DATADIR%%/20_net_tests.cf
%%DATADIR%%/20_phrases.cf
%%DATADIR%%/20_porn.cf
%%DATADIR%%/20_ratware.cf
%%DATADIR%%/20_uri_tests.cf
%%DATADIR%%/23_bayes.cf
%%DATADIR%%/25_accessdb.cf
%%DATADIR%%/25_antivirus.cf
%%DATADIR%%/25_body_tests_es.cf
%%DATADIR%%/25_body_tests_pl.cf
%%DATADIR%%/25_dcc.cf
%%DATADIR%%/25_domainkeys.cf
%%DATADIR%%/25_hashcash.cf
%%DATADIR%%/25_pyzor.cf
%%DATADIR%%/25_razor2.cf
%%DATADIR%%/25_replace.cf
%%DATADIR%%/25_spf.cf
%%DATADIR%%/25_textcat.cf
%%DATADIR%%/25_uribl.cf
%%DATADIR%%/30_text_de.cf
%%DATADIR%%/30_text_fr.cf
%%DATADIR%%/30_text_it.cf
%%DATADIR%%/30_text_nl.cf
%%DATADIR%%/30_text_pl.cf
%%DATADIR%%/30_text_pt_br.cf
%%DATADIR%%/50_scores.cf
%%DATADIR%%/60_awl.cf
%%DATADIR%%/60_whitelist.cf
%%DATADIR%%/60_whitelist_spf.cf
%%DATADIR%%/60_whitelist_subject.cf
%%DATADIR%%/languages
%%DATADIR%%/triplets.txt
%%DATADIR%%/user_prefs.template
@ -98,9 +144,11 @@ etc/rc.d/sa-spamd.sh
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Plugin
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Message/Metadata
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Message
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Logger
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Locker
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Conf
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/BayesStore
@dirrm %%SITE_PERL%%/Mail/SpamAssassin/Bayes
@dirrm %%SITE_PERL%%/Mail/SpamAssassin
@unexec rmdir %D/%%SITE_PERL%%/Mail 2>/dev/null || true
@unexec rmdir %D/etc/mail/spamassassin 2>/dev/null || true