From 2e890cdbf4d8e8ed77a4c77cacbf346da9325207 Mon Sep 17 00:00:00 2001 From: "cebka@lenovo-laptop" Date: Mon, 15 Mar 2010 21:00:38 +0300 Subject: * Parse '*' in host name from config file correctly --- rspamc.pl.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rspamc.pl.in b/rspamc.pl.in index efadde0a2..6aca04d0d 100755 --- a/rspamc.pl.in +++ b/rspamc.pl.in @@ -122,7 +122,12 @@ sub parse_config { if (!$skip && ((!$is_ctrl && !$ctrl) || ($ctrl && $is_ctrl)) && $_ =~ /^\s*bind_socket\s*=\s*((([^:]+):(\d+))|(\/\S*))/i) { if ($3 && $4) { - $cfg{'hosts'} = [ "$3:$4" ]; + if ($3 eq '*') { + $cfg{'hosts'} = [ "127.0.0.1:$4" ]; + } + else { + $cfg{'hosts'} = [ "$3:$4" ]; + } } else { $cfg{'hosts'} = [ "$5" ]; -- cgit v1.2.3