aboutsummaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-09-21 20:11:34 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-09-21 20:11:34 +0400
commitf795dc8138d929b96f9ffbac48793497d6b32a6f (patch)
tree6eb2148fdf9986355f707ac7844e05bee1c58e25 /perl
parent0287117599edd2cb87822b2cac50b14a58dc3d9a (diff)
downloadrspamd-f795dc8138d929b96f9ffbac48793497d6b32a6f.tar.gz
rspamd-f795dc8138d929b96f9ffbac48793497d6b32a6f.zip
* New trie based url scanner (based on libcamel)
* Small fixes to rspamd perl client * Write fuzzy hashes info to log
Diffstat (limited to 'perl')
-rw-r--r--perl/lib/Mail/Rspamd/Client.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/perl/lib/Mail/Rspamd/Client.pm b/perl/lib/Mail/Rspamd/Client.pm
index 4af7a02d9..cbafcec8f 100644
--- a/perl/lib/Mail/Rspamd/Client.pm
+++ b/perl/lib/Mail/Rspamd/Client.pm
@@ -577,7 +577,10 @@ sub _create_connection {
do {
$server = $self->_select_server();
$tries ++;
-
+
+ if ($server->{host} eq '*') {
+ $server->{host} = '127.0.0.1';
+ }
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => $server->{host},
PeerPort => $server->{port},
@@ -610,6 +613,9 @@ sub _create_connection {
}
}
elsif ($hostdef =~ /^\s*(([^:]+):(\d+))\s*$/) {
+ if ($2 eq '*') {
+ $2 = '127.0.0.1';
+ }
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => $2,
PeerPort => $3,
@@ -627,6 +633,9 @@ sub _create_connection {
}
}
elsif ($hostdef =~ /^\s*([^:]+)\s*$/) {
+ if ($1 eq '*') {
+ $1 = '127.0.0.1';
+ }
$remote = IO::Socket::INET->new( Proto => "tcp",
PeerAddr => $1,
PeerPort => $self->{control} ? 11334 : 11333,