Postfix Fixes and Auto Response Fixes
This commit is contained in:
parent
13aff94012
commit
c3952d5c19
3 changed files with 21 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue