Strip only leading/trailing spaces when reading config values

(mainly for FROM_EMAIL)
Add > before first From_ header of spam message to avoid mail splitting
here by some MUAs.
This commit is contained in:
Andrey A. Chernov 2003-10-08 02:57:00 +00:00
parent 5fde0b18cf
commit 6eb81045c2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=90586
3 changed files with 23 additions and 4 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= ricochet
PORTVERSION= 0.98
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= mail
MASTER_SITES= http://vipul.net/perl/sources/spamcontrol/ricochet/

View file

@ -0,0 +1,9 @@
--- complaint-template.bak Thu Feb 8 18:09:41 2001
+++ complaint-template Wed Oct 8 06:50:31 2003
@@ -14,5 +14,5 @@
------------ unsolicited commercial mail follows -----------
-{return $self->spam}
+>{return $self->spam}

View file

@ -1,5 +1,5 @@
--- ricochet.old Tue Jun 24 22:40:18 2003
+++ ricochet Wed Sep 24 16:33:42 2003
--- ricochet.orig Tue Jun 24 22:40:18 2003
+++ ricochet Wed Oct 8 06:42:08 2003
@@ -566,15 +566,14 @@
my ( $domain ) = @_;
$ua = new LWP::UserAgent;
@ -19,7 +19,7 @@
return \@matches;
} else {
return undef;
@@ -607,7 +606,8 @@
@@ -607,13 +606,17 @@
sub initialize {
my $self = shift;
@ -29,3 +29,13 @@
Carp::croak "** Ricochet configuration file $rc doesn't exist. Aborting.\n" unless -e $rc;
open (RC, $rc);
grep {
chomp;
s/#.*$//;
- my ($field, $value) = split /:/, $_, 2; $value =~ s/\s//g; $field =~ s/\s//g;
+ my ($field, $value) = split /:/, $_, 2;
+ $value =~ s/^\s+//;
+ $value =~ s/\s+$//;
+ $field =~ s/\s//g;
$self->{$field} = $value unless $field ne "SENDMAIL" && defined $self->{$field};
} (<RC>);
close RC;