소스 검색

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 6 년 전
부모
커밋
5a050d360c
4개의 변경된 파일36개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      src/freedombone-app-riot
  2. 30
    0
      src/freedombone-base-email
  3. 1
    0
      src/freedombone-upgrade
  4. 3
    0
      src/freedombone-utils-setup

+ 2
- 2
src/freedombone-app-riot 파일 보기

@@ -32,9 +32,9 @@ IN_DEFAULT_INSTALL=0
32 32
 SHOW_ON_ABOUT=1
33 33
 NOT_ON_ONION=1
34 34
 
35
-RIOT_VERSION='0.13.3'
35
+RIOT_VERSION='0.15.3'
36 36
 RIOT_FILENAME="riot-v${RIOT_VERSION}"
37
-RIOT_HASH='bcd6c2f4be018612ac76a71b58749a5edab1e02de7d145a22d9b9aa6e6a89129'
37
+RIOT_HASH='0aecaa1c0d1e387c1730fea33cdb01b1a296e6146b7aef6a819fa90d9efc026e'
38 38
 RIOT_DOWNLOAD_URL="https://github.com/vector-im/riot-web/releases/download/v${RIOT_VERSION}"
39 39
 RIOT_ONION_PORT=8115
40 40
 RIOT_ONION_HOSTNAME=

+ 30
- 0
src/freedombone-base-email 파일 보기

@@ -1694,4 +1694,34 @@ function install_email {
1694 1694
     mark_completed "${FUNCNAME[0]}"
1695 1695
 }
1696 1696
 
1697
+function remove_ip_addresses_from_email_logs {
1698
+    { echo '#!/bin/bash';
1699
+      echo '';
1700
+      echo 'if grep -q "= /dev/null" /etc/php/7.0/fpm/php-fpm.conf; then';
1701
+      echo '    if [ -f /var/log/exim4/mainlog ]; then';
1702
+      echo '        rm /var/log/exim4/mainlog';
1703
+      echo '    fi';
1704
+      echo '    if [ -f /var/log/exim4/rejectlog ]; then';
1705
+      echo '        rm /var/log/exim4/rejectlog';
1706
+      echo '    fi';
1707
+      echo 'else';
1708
+      echo '    if [ -f /var/log/exim4/mainlog ]; then';
1709
+      echo "        if grep -q '\\[' /var/log/exim4/mainlog; then";
1710
+      echo "            tail -n 50 /var/log/exim4/mainlog | sed 's/\\[[^][]*\\]//g' > /tmp/.exim4_mainlog";
1711
+      echo '            chown Debian-exim:adm /tmp/.exim4_mainlog';
1712
+      echo '            mv /tmp/.exim4_mainlog /var/log/exim4/mainlog';
1713
+      echo '        fi';
1714
+      echo '    fi';
1715
+      echo '    if [ -f /var/log/exim4/rejectlog ]; then';
1716
+      echo "        if grep -q '\\[' /var/log/exim4/rejectlog; then";
1717
+      echo "            tail -n 50 /var/log/exim4/rejectlog | sed 's/\\[[^][]*\\]//g' > /tmp/.exim4_rejectlog";
1718
+      echo '            chown Debian-exim:adm /tmp/.exim4_rejectlog';
1719
+      echo '            mv /tmp/.exim4_rejectlog /var/log/exim4/rejectlog';
1720
+      echo '        fi';
1721
+      echo '    fi';
1722
+      echo 'fi'; } > /usr/bin/exim_log_tidy
1723
+    chmod +x /usr/bin/exim_log_tidy
1724
+    cron_add_mins 1 '/usr/bin/exim_log_tidy'
1725
+}
1726
+
1697 1727
 # NOTE: deliberately no exit 0

+ 1
- 0
src/freedombone-upgrade 파일 보기

@@ -107,6 +107,7 @@ if [ -d "$PROJECT_DIR" ]; then
107 107
         apt-get -yq -t stretch-backports install certbot
108 108
         email_install_tls
109 109
         email_disable_chunking
110
+        remove_ip_addresses_from_email_logs
110 111
         rm /etc/exim4/exim4.conf.template.bak*
111 112
         email_update_onion_domain
112 113
         prevent_mail_process_overrun

+ 3
- 0
src/freedombone-utils-setup 파일 보기

@@ -1096,6 +1096,9 @@ function setup_email {
1096 1096
     function_check install_email
1097 1097
     install_email
1098 1098
 
1099
+    function_check remove_ip_addresses_from_email_logs
1100
+    remove_ip_addresses_from_email_logs
1101
+
1099 1102
     function_check create_procmail
1100 1103
     create_procmail
1101 1104