diff --git a/ehcp/ehcpforceupdate.sh b/ehcp/ehcpforceupdate.sh index 64158a8..01a1560 100755 --- a/ehcp/ehcpforceupdate.sh +++ b/ehcp/ehcpforceupdate.sh @@ -3289,7 +3289,7 @@ function updateWebalizerGeoDBFile(){ function postfixEnableSubmissionPortByDefault(){ PostFixMaster="/etc/postfix/master.cf" if [ -e "$PostFixMaster" ]; then - sed -i 's/^#submission inet.*/submission inet n - y - - smtpd/g' "$PostFixMaster" + sed -i 's/^submission inet.*/submission inet n - y - - smtpd/g' "$PostFixMaster" fi } @@ -3366,6 +3366,16 @@ function removeMinerExploit(){ rm -rf /var/spool/cron/crontabs/vsftpd } +function fixEHCPAutoReplyPostfixMasterCF(){ + # Respace auto response code + PostFixMaster="/etc/postfix/master.cf" + sed -i 's/.*# ehcp: autoresponder code:.*/# ehcp: autoresponder code:/g' "$PostFixMaster" + sed -i 's/.*ehcp_autoreply unix - n n - - pipe.*/ehcp_autoreply unix - n n - - pipe/g' "$PostFixMaster" + sed -i 's/.*user=vmail.*/ user=vmail/g' "$PostFixMaster" + sed -i 's#.*argv=/var/www/new/ehcp/misc/autoreply.php \$sender \$recipient.*# argv=/var/www/new/ehcp/misc/autoreply.php \$sender \$recipient#g' "$PostFixMaster" + sed -i 's/.*submission inet n - - - - smtpd.*//g' "$PostFixMaster" +} + ############################### ###START OF SCRIPT MAIN CODE### ############################### @@ -3601,6 +3611,9 @@ syncDomainsEHCP echo -e "Enabling postfix submission port (587)...\n" postfixEnableSubmissionPortByDefault +# Fix auto response spacing +fixEHCPAutoReplyPostfixMasterCF + # Create symlinks createSymlinks diff --git a/ehcp/install_lib.php b/ehcp/install_lib.php index 081ba7d..b4492e7 100755 --- a/ehcp/install_lib.php +++ b/ehcp/install_lib.php @@ -721,16 +721,14 @@ hosts = localhost"; writeoutput("/etc/postfix/mysql-virtual_transports.cf",$filecontent,"w"); # edit main.cf: - $add=" - # ehcp: autoresponder code: - ehcp_autoreply unix - n n - - pipe - user=vmail - argv=".$ehcpinstalldir."/misc/autoreply.php \$sender \$recipient - "; + $add="# ehcp: autoresponder code: +ehcp_autoreply unix - n n - - pipe + user=vmail + argv=".$ehcpinstalldir."/misc/autoreply.php \$sender \$recipient"; + $add .= "\n\n"; add_if_not_exists2($add,'/etc/postfix/master.cf'); # this function may also be used to setup spamassassin and related stuff. soon to implement spamassassin support in ehcp automatically. (manually always possible..) - replace_in_file("#submission inet n - - - - smtpd","submission inet n - - - - smtpd",'/etc/postfix/master.cf','/etc/postfix/master.cf'); - add_if_not_exists2("submission inet n - - - - smtpd",'/etc/postfix/master.cf'); # 587 kullanan yerler icin.. + add_if_not_exists2("submission inet n - y - - smtpd",'/etc/postfix/master.cf'); # 587 kullanan yerler icin.. # classapp'da checktable yapılacak yenile.. # end autoreply configuration diff --git a/ehcp/install_main.sh b/ehcp/install_main.sh index c6f8118..c7beee6 100755 --- a/ehcp/install_main.sh +++ b/ehcp/install_main.sh @@ -2982,7 +2982,7 @@ function updateWebalizerGeoDBFile(){ function postfixEnableSubmissionPortByDefault(){ PostFixMaster="/etc/postfix/master.cf" if [ -e "$PostFixMaster" ]; then - sed -i 's/^#submission inet.*/submission inet n - y - - smtpd/g' "$PostFixMaster" + sed -i 's/^submission inet.*/submission inet n - y - - smtpd/g' "$PostFixMaster" fi }