浏览代码

Change default domain if needed

Bob Mottram 8 年前
父节点
当前提交
48cf548a67
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      src/freedombone-base-email

+ 2
- 0
src/freedombone-base-email 查看文件

839
     sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf.template
839
     sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf.template
840
     if ! grep -q "MAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template; then
840
     if ! grep -q "MAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template; then
841
         sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template
841
         sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template
842
+    else
843
+        sed -i "s|MAIN_HARDCODE_PRIMARY_HOSTNAME =.*|MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME|g" /etc/exim4/exim4.conf.template
842
     fi
844
     fi
843
     sed -i "s|SMTPLISTENEROPTIONS=''|SMTPLISTENEROPTIONS='-oX 465:25:587 -oP /var/run/exim4/exim.pid'|g" /etc/default/exim4
845
     sed -i "s|SMTPLISTENEROPTIONS=''|SMTPLISTENEROPTIONS='-oX 465:25:587 -oP /var/run/exim4/exim.pid'|g" /etc/default/exim4
844
     if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf.template; then
846
     if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf.template; then