diff options
author | ache <ache@FreeBSD.org> | 2003-06-18 19:32:58 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-06-18 19:32:58 +0800 |
commit | 3c27c8a6d33d663b2b075de57c89b9344c4ed90a (patch) | |
tree | 08af09c37f77b4709e018facb989af187c7ecbb1 /mail | |
parent | 6ae1440724e5efa196663d1ff839618ce95da05e (diff) | |
download | freebsd-ports-gnome-3c27c8a6d33d663b2b075de57c89b9344c4ed90a.tar.gz freebsd-ports-gnome-3c27c8a6d33d663b2b075de57c89b9344c4ed90a.tar.zst freebsd-ports-gnome-3c27c8a6d33d663b2b075de57c89b9344c4ed90a.zip |
Use REINPLACE_CMD
Configure perl path properly
Understand non-sendmail true IP formats
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ricochet/Makefile | 8 | ||||
-rw-r--r-- | mail/ricochet/files/patch-ricochet | 20 |
2 files changed, 17 insertions, 11 deletions
diff --git a/mail/ricochet/Makefile b/mail/ricochet/Makefile index 0d4ec6e9cae7..8c9b740f3689 100644 --- a/mail/ricochet/Makefile +++ b/mail/ricochet/Makefile @@ -7,7 +7,7 @@ PORTNAME= ricochet PORTVERSION= 0.97 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= mail MASTER_SITES= http://vipul.net/perl/sources/spamcontrol/ricochet/ @@ -21,11 +21,13 @@ RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/Internet.pm:${POR ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/LWP/UserAgent.pm:${PORTSDIR}/www/p5-libwww NO_BUILD= yes +PERL_CONFIGURE= yes do-configure: .for file in install ricochet - ${PERL5} -pi -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/${file} - ${PERL5} -pi -e 's,%%INSTALL_DATA%%,${INSTALL_DATA},g' ${WRKSRC}/${file} + ${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' ${WRKSRC}/${file} + ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/${file} + ${REINPLACE_CMD} -e 's,%%INSTALL_DATA%%,${INSTALL_DATA},g' ${WRKSRC}/${file} .endfor do-install: diff --git a/mail/ricochet/files/patch-ricochet b/mail/ricochet/files/patch-ricochet index 32e32403ce58..384f492e6304 100644 --- a/mail/ricochet/files/patch-ricochet +++ b/mail/ricochet/files/patch-ricochet @@ -1,5 +1,5 @@ --- ricochet.orig Thu Feb 8 22:23:19 2001 -+++ ricochet Wed Jun 18 12:52:41 2003 ++++ ricochet Wed Jun 18 15:19:43 2003 @@ -128,7 +128,10 @@ ## List of receipients at ORIG_DOMAN ## besides the CONTACTS. @@ -50,7 +50,7 @@ my $IPRE = '\d{1,3}\.\d{1,3}\.\d{1,3}.\d{1,3}'; my ($self, $received) = @_; -@@ -401,13 +411,20 @@ +@@ -401,13 +411,24 @@ $received =~ /from\s(.*?)$rfc/s; my $from = " $1 "; $received =~ /by\s(.*?)$rfc/s; my $by = " $1 "; @@ -60,7 +60,11 @@ + ## Trust only "(host.name [" part, HELO can be fake + my @orig_hosts = $from =~ /\([^()\[\]]*?($HOSTRE)[^()\[\]]*?\[/gs; -+ my @orig_ips = $from =~ /\([^()\[\]]*\[($IPRE)\]/gs; ++ my @orig_ips = $from =~ /\[($IPRE)\]/gs; ++ if ($#orig_ips == -1) { ++ # check it last because of "(1.2.3.4) [2.3.4.5]" ++ @orig_ips = $from =~ /\(($IPRE)\)/gs; ++ } + my @transmit_hosts = $by =~ /($HOSTRE)/gs; my @ips = $by =~ /($IPRE)/gs; + @@ -75,7 +79,7 @@ $auth = 1; $self->{ORIG_HOSTS}->add ($_); $self->debug (2,"+ $_ EXISTS."); -@@ -417,15 +434,21 @@ +@@ -417,15 +438,21 @@ my $host; grep { if ($host = _ptrquery ($_)) { @@ -100,7 +104,7 @@ $auth = 1; $self->{TRANSMIT_HOSTS}->add ($_); $self->debug (2,"+ $_ EXISTS."); -@@ -439,7 +462,13 @@ +@@ -439,7 +466,13 @@ } unless ($self->relaxed == 1) { @@ -115,7 +119,7 @@ } $self->debug (2, "+ Seems Authentic.\n"); -@@ -574,7 +603,8 @@ +@@ -574,7 +607,8 @@ sub initialize { my $self = shift; @@ -125,7 +129,7 @@ Carp::croak "** Ricochet configuration file $rc doesn't exist. Aborting.\n" unless -e $rc; open (RC, $rc); grep { -@@ -758,8 +788,8 @@ +@@ -758,8 +792,8 @@ sub _domain { my $host = shift; $host =~ y/A-Z/a-z/; my $domain = ''; @@ -136,7 +140,7 @@ return $domain ? $domain : undef; } -@@ -769,7 +799,7 @@ +@@ -769,7 +803,7 @@ ## --------------------------------------------------------------------------- sub _host { |