Skip to content

Commit 33ec98b

Browse files
author
Till Brehm
committed
Fixed master.cf service detection for old postfix versions.
1 parent 0e11113 commit 33ec98b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,8 @@ public function get_postfix_service($service, $type) {
823823
$postfix_service = @($out[0]=='')?false:true;
824824
} else { //* fallback - Postfix < 2.9
825825
$content = rf($conf['postfix']['config_dir'].'/master.cf');
826-
$regex = '/[^#]'.$service.'.*.'.$type.'.*/';
827-
$postfix_service = @(!preg_match($regex, $content))?true:false;
826+
$regex = "/^((?!#)".$service.".*".$type.".*)$/m";
827+
$postfix_service = @(preg_match($regex, $content))?true:false;
828828
}
829829

830830
return $postfix_service;

0 commit comments

Comments
 (0)