mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Use REINPLACE_CMD
Configure perl path properly Understand non-sendmail true IP formats
This commit is contained in:
parent
cdeaba8897
commit
c7cd23bbad
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83253
@ -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:
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user