]> source.dussan.org Git - rspamd.git/commitdiff
* Parse '*' in host name from config file correctly
authorcebka@lenovo-laptop <cebka@lenovo-laptop>
Mon, 15 Mar 2010 18:00:38 +0000 (21:00 +0300)
committercebka@lenovo-laptop <cebka@lenovo-laptop>
Mon, 15 Mar 2010 18:00:38 +0000 (21:00 +0300)
rspamc.pl.in

index efadde0a2bdd60bcc09de98ef47e5b47692627ab..6aca04d0d718467d24e7e489042c502875179398 100755 (executable)
@@ -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" ];