1. 避免升級失敗,先備份現有的roundcube檔案與資料庫
2. 下載要更新的roundcube版本並解壓縮
3. 在php.ini內,確定"system"不在"disable_functions" 設定值內
4.到解壓縮的新版本資料夾下,執行 bin下的installto.sh
cd 解壓的新版本資料夾
bin/installto.sh 目前版本的安裝資料夾
5. 收工!
1. 避免升級失敗,先備份現有的roundcube檔案與資料庫
2. 下載要更新的roundcube版本並解壓縮
3. 在php.ini內,確定"system"不在"disable_functions" 設定值內
4.到解壓縮的新版本資料夾下,執行 bin下的installto.sh
cd 解壓的新版本資料夾
bin/installto.sh 目前版本的安裝資料夾
5. 收工!
關閉outlook,執行regedit
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook
"新增""可擴充字串" 名稱"ForcePSTPath", 字串是 “新的存放路徑”
設定好後,開啟outlook,刪除要變更位置的mail帳號,重新新增imap帳號!
下載:
https://github.com/dsoares/roundcube-rcguard
安裝:
1.將資料夾放置於plugins下
2.在reCAPTCHA 的資料夾下,將預設的config.inc.php.dist 複製一份為config.inc.php,並依需求修改內容
3.以下兩個key須至google申請
// reCAPTCHA site key
$rcmail_config['recaptcha_publickey']
// reCAPTCHA secret key
$rcmail_config['recaptcha_privatekey']
4.依所使用的資料庫類別,匯入在SQL資料夾下相對應的表單至roundcube的資料庫下
1.
echo 'datasource_list: [ None ]' | sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg
2.
sudo apt-get purge cloud-init
3.
sudo rm -rf /etc/cloud/; sudo rm -rf /var/lib/cloud/
4.
sudo reboot
#!/bin/bash
grep -o 'unknown\[.*\]' /var/log/mail.log |grep -o '\[.*\]' | sed 's/\[//'|sed 's/\]//'|grep -v 192.168.118.252 |sort|uniq > DNSBL.txt
grep 'listed by domain' /var/log/mail.log |awk '{print $7}' |sort|uniq >> DNSBL.txt
ip=($(cat DNSBL.txt |sort |uniq)) #設定ip陣列
echo ${ip[@]} #叫出陣列值
len=${#ip[*]} #陣列長度
echo $len
/sbin/iptables -F
for i in "${ip[@]}" #迴圈
do
/sbin/iptables -t filter -I INPUT -p tcp -s $i -j DROP
done
Jun 28 14:33:21 relaynat postfix/smtpd[46810]: connect from unknown[185.143.73.103]
Jun 28 14:33:22 relaynat postfix/smtpd[46810]: disconnect from unknown[185.143.73.103] ehlo=1 quit=1 commands=2
grep -o 'unknown\[.*\]' /var/log/mail.log |grep -o '\[.*\]' | sed 's/\[//'|sed 's/\]//'|grep -v 192.168.118.252 |sort|uniq > DNSBL.txt
unknown[185.143.73.134]
[185.143.73.103]
185.143.73.134
Jun 28 14:29:20 relaynat postfix/dnsblog[45760]: addr 185.143.73.58 listed by domain zen.spamhaus.org as 127.0.0.4
grep 'listed by domain' /var/log/mail.log |awk '{print $7}' |awk '!x[$0]++' >> tmpList.txt
Jun 28 14:34:05 relaynat postfix/dnsblog[45760]: addr 185.143.72.34 listed by domain zen.spamhaus.org as 127.0.0.4
grep 'listed by domain' /var/log/mail.log |awk '{print $7}'
185.143.72.34
awk '!x[$0]++'
awk -F"" '{ for (i=6; i<=NF; i++) print $i }'
F定義awk要使用的分隔符為空格,這也是awk預設的分隔符。
NF定義欄位/列的總數,因此循環將從第6個欄位開始到最後一個欄位/列。
其中$N檢索第n個欄位的值,因此列印$i將基於循環計數列印當前欄位/列。
mount /dev/cdrom /mnt
cd /mnt
cp VMwareTools-10.3.21-14772444.tar.gz /tmp
cd /tmp
tar zxvf VMwareTools-10.3.21-14772444.tar.gz
yum -y install gcc kernel-devel
執行安裝檔
cd vmware-tools-distrib/
./vmware-install.pl
過程中的問題全部按Enter跳過即可!
echo 'datasource_list: [ None ]' | sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg
sudo apt-get purge cloud-init
sudo rm -rf /etc/cloud/; sudo rm -rf /var/lib/cloud/
檔案名稱 | 說明 |
---|---|
cert.pem | 申請網域的憑證 |
chain.pem | Let's Encrypt 的憑證 |
fullchain.pem | cert.pem 及 chain.pem 合併檔案 |
privkey.pem | 申請網域的憑證密鑰 |
# TLS parameters
#default: empty;none:TLS will not be used;may:Opportunistic TLS;encrypt:Mandatory TLS encryption
#2.3以後版本使用,取代2.2以前的smtpd_use_tls=yes
#user client smtp to server
smtpd_tls_security_level = encrypt
#mail server smtp to mail server
smtp_tls_security_level = encrypt
#Discovering servers that support TLS
smtp_tls_note_starttls_offer = yes
#default: empty;Name of the file containing the optional Postfix SMTP server TLS session cache.
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#default: empty;Name of the file containing the optional Postfix SMTP client TLS session cache.
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
#憑證位置
#postfix <= 3.3
#postfix >= 3.4
smtpd_tls_chain_files = /etc/letsencrypt/archive/你申請的Domain/privkey.pem,
/etc/letsencrypt/archive/你申請的Domain/fullchain.pem
#在mail的header加上SSL/TLS 相關資訊
smtpd_tls_received_header = yes
#客戶端/客戶發送郵件到我的服務器時,是否強制加密
smtpd_tls_auth_only = yes
#Log
smtpd_tls_loglevel = 1
ssl_cert = </etc/letsencrypt/archive/你申請的Domain/cert.pem
ssl_key = </etc/letsencrypt/archive/你申請的Domain/privkey.pem
ssl_ca = /etc/letsencrypt/archive/你申請的Domain/fullchain.pem
ssl_min_protocol = TLSv1.2
存檔後重新啟動dovecot!