summaryrefslogtreecommitdiffstats
path: root/rspamc.pl.in
diff options
context:
space:
mode:
authorcebka@lenovo-laptop <cebka@lenovo-laptop>2010-03-15 21:00:38 +0300
committercebka@lenovo-laptop <cebka@lenovo-laptop>2010-03-15 21:00:38 +0300
commit2e890cdbf4d8e8ed77a4c77cacbf346da9325207 (patch)
tree26de73a8f6089cd1b0c7259e52ca64bc5f45a448 /rspamc.pl.in
parent21dc91eac153c2dade3c393d0e6f6c4e66d51a94 (diff)
downloadrspamd-2e890cdbf4d8e8ed77a4c77cacbf346da9325207.tar.gz
rspamd-2e890cdbf4d8e8ed77a4c77cacbf346da9325207.zip
* Parse '*' in host name from config file correctly
Diffstat (limited to 'rspamc.pl.in')
-rwxr-xr-xrspamc.pl.in7
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" ];