diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2003-06-18 09:03:36 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2003-06-18 09:03:36 +0000 |
commit | a1ac4c1a825f6f9b9f572312a9734934303a0c7f (patch) | |
tree | 3756bbf0f0989dde371e5b9c069c9e9d5681b730 /mail/ricochet | |
parent | This module works only with perl version 5.6.1 and above. (diff) |
Don't trust IP comes from fake HELO
Notes
Notes:
svn path=/head/; revision=83248
Diffstat (limited to 'mail/ricochet')
-rw-r--r-- | mail/ricochet/Makefile | 2 | ||||
-rw-r--r-- | mail/ricochet/files/patch-ricochet | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/mail/ricochet/Makefile b/mail/ricochet/Makefile index a059cb561e37..0d4ec6e9cae7 100644 --- a/mail/ricochet/Makefile +++ b/mail/ricochet/Makefile @@ -7,7 +7,7 @@ PORTNAME= ricochet PORTVERSION= 0.97 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= mail MASTER_SITES= http://vipul.net/perl/sources/spamcontrol/ricochet/ diff --git a/mail/ricochet/files/patch-ricochet b/mail/ricochet/files/patch-ricochet index a163df96a17c..32e32403ce58 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 Sun May 19 12:24:58 2002 ++++ ricochet Wed Jun 18 12:52:41 2003 @@ -128,7 +128,10 @@ ## List of receipients at ORIG_DOMAN ## besides the CONTACTS. @@ -55,12 +55,13 @@ $received =~ /from\s(.*?)$rfc/s; my $from = " $1 "; $received =~ /by\s(.*?)$rfc/s; my $by = " $1 "; - my @orig_hosts = $from =~ /($HOSTRE)/gs; -+ +- my @orig_ips = $from =~ /($IPRE)/gs; +- my @transmit_hosts = $by =~ /($HOSTRE)/gs; + + ## Trust only "(host.name [" part, HELO can be fake + my @orig_hosts = $from =~ /\([^()\[\]]*?($HOSTRE)[^()\[\]]*?\[/gs; - my @orig_ips = $from =~ /($IPRE)/gs; - my @transmit_hosts = $by =~ /($HOSTRE)/gs; -- ++ my @orig_ips = $from =~ /\([^()\[\]]*\[($IPRE)\]/gs; ++ my @transmit_hosts = $by =~ /($HOSTRE)/gs; my @ips = $by =~ /($IPRE)/gs; + + my $header = $self->{MAIL}->head; |