diff options
author | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-15 21:00:38 +0300 |
---|---|---|
committer | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-15 21:00:38 +0300 |
commit | 2e890cdbf4d8e8ed77a4c77cacbf346da9325207 (patch) | |
tree | 26de73a8f6089cd1b0c7259e52ca64bc5f45a448 | |
parent | 21dc91eac153c2dade3c393d0e6f6c4e66d51a94 (diff) | |
download | rspamd-2e890cdbf4d8e8ed77a4c77cacbf346da9325207.tar.gz rspamd-2e890cdbf4d8e8ed77a4c77cacbf346da9325207.zip |
* Parse '*' in host name from config file correctly
-rwxr-xr-x | rspamc.pl.in | 7 |
1 files changed, 6 insertions, 1 deletions
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" ]; |