From f795dc8138d929b96f9ffbac48793497d6b32a6f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 21 Sep 2010 20:11:34 +0400 Subject: * New trie based url scanner (based on libcamel) * Small fixes to rspamd perl client * Write fuzzy hashes info to log --- perl/lib/Mail/Rspamd/Client.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'perl') 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, -- cgit v1.2.3