虛擬機(jī)插入 Centos 7 Min .ISO 光盤
十余年的金沙網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。網(wǎng)絡(luò)營(yíng)銷推廣的優(yōu)勢(shì)是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整金沙建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無(wú)論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)從事“金沙網(wǎng)站設(shè)計(jì)”,“金沙網(wǎng)站推廣”以來(lái),每個(gè)客戶項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。
進(jìn)入到安裝選 項(xiàng) 按tab鍵
添加 inst.ks=http://dl.efa-project.org/build/4/kstesting.cfg
按Enter 自動(dòng)安裝,網(wǎng)絡(luò)安裝 大概需要下載500MB左右的文件 需要等60分鐘左右
安裝完成
安裝配置
修改網(wǎng)卡
vi /etc/sysconfig/network-scripts/ifcfg-ens160
你不會(huì)在eFa上使用智能主機(jī),而是建立eFa作為出站中繼。
EFA配置選項(xiàng)7)郵件設(shè)置 - >選項(xiàng)1)出站郵件中繼
EFA配置選項(xiàng)7“出站智能主機(jī)”(7,2)“智能主機(jī):已禁用”,因?yàn)槟M鸈FA直接發(fā)送郵件
EFA配置選項(xiàng)7“傳輸設(shè)置” “(7,4)as”domain.com“”<您的交換服務(wù)器的內(nèi)部IP地址“
EFA配置選項(xiàng)8“垃圾郵件設(shè)置” “(8,1)非垃圾郵件設(shè)置
垃圾郵件設(shè)置>非垃圾郵件設(shè)置
禁用非垃圾郵件簽名:是(此設(shè)置取決于您是否需要EFA水印,我禁用它,因?yàn)槲覀儯↖T管理員)管理垃圾郵件而不是用戶。此外,我們的大多數(shù)(99%)用戶都是外部的將全民教育暴露在互聯(lián)網(wǎng)上。)
EFA V4與Active Directory集成
請(qǐng)安裝 php-ldap (rpm -qa|grep php)
yum install lrzsz -y
vi /var/www/html/mailscanner/conf.php(編輯后重啟系統(tǒng) 需要開啟apache https)
// LDAP settings for authentication
define('USE_LDAP', true);
define('LDAP_SSL', false);
define('LDAP_HOST', '192.168.32.83');
define('LDAP_PORT', '389');
define('LDAP_DN', 'OU=email,DC=test,DC=xyz');
define('LDAP_USER', 'test@test.xyz');
define('LDAP_PASS', '123456');
define('LDAP_SITE', 'Default-First-Site-Name');
define('LDAP_FILTER', 'proxyAddresses=smtp:%s', 'mail=%s');
define('LDAP_PROTOCOL_VERSION', 3);
define('LDAP_EMAIL_FIELD', 'mail');
define('LDAP_USERNAME_FIELD', 'cn');
define('LDAP_MS_AD_COMPATIBILITY', true);
vi /etc/hosts (添加exchange服務(wù)器IP和域名)
192.168.32.83 mail.test.xyz
設(shè)置垃圾郵件不修改主題
vi /etc/MailScanner/MailScanner.conf
Spam Subject Text =
/etc/init.d/spamassassin restart
exchange 設(shè)置垃圾郵件過(guò)濾
添加規(guī)則
New-TransportRule -Name "EFA to Junk Folder" -HeaderMatchesMessageHeader "X-Spam-Status" -HeaderMatchesPatterns "Yes" -SetSCL 9 -Comments "This rule moves spam messages from the EFA filter to the users junk mail folder."
步驟 2:使用命令行管理程序重新啟動(dòng) Microsoft Exchange 傳輸服務(wù)
運(yùn)行命令:Restart-Service MSExchangeTransport
重啟服務(wù)
service sqlgrey restart
service spamassassin restart
service webmin restart
service clamd restart
service MailScanner restart
service postfix restart
MailScanner --lint
spamassassin -D --lint (重新加載規(guī)則)
安裝fail2ban? 自動(dòng)攔截郵件***
yum install fail2ban –y
# vi /etc/fail2ban/jail.conf
最后一行添加如下:
[postfix]
enabled = true
filter = postfix
action = iptables-allports[name=postfix, port=25, protocol=tcp]
ignoreip = 127.0.0.1
logpath = /var/log/maillog
bantime = 6048000
findtime = 120
maxretry = 3
[postfix-ddos]
enabled = true
filter = postfix-ddos
action = iptables-allports[name=MAIL, protocol=all]
logpath = /var/log/maillog
maxretry = 2
findtime = 86400
bantime = 604800
/etc/fail2ban/filter.d中編輯或新加文件,文件名一定要跟上一步j(luò)ail.conf配置文件中的“filter=”對(duì)應(yīng)
POSTFIX
vi /etc/fail2ban/filter.d/postfix.conf
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
#
# $Revision: 510 $
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P
# Values: TEXT
#
failregex = warning: (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
reject: RCPT from (.*)\[
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
--------------------------------------------------------------------------------------------------------------
vi /etc/fail2ban/filter.d/postfix-ddos.conf
# Fail2Ban filter for Postfix DDOS attacks # [INCLUDES] before = common.conf [Definition] _daemon = postfix/(submission/)?smtp(d|s) failregex = ^%(__prefix_line)sNOQUEUE: reject: RCPT from \S+\[
啟動(dòng)fail2ban
systemctl start fail2ban
查看攔截fail2ban
fail2ban-client status postfix
CentOS7版本后防火墻默認(rèn)使用firewalld
systemctl start firewalld
yum install -y iptables-services
service iptables start
vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 10000 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
測(cè)試郵件內(nèi)容過(guò)濾
發(fā)送測(cè)試郵件的文本內(nèi)容如下:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
測(cè)試反病毒郵件
發(fā)送測(cè)試郵件的文本內(nèi)容如下:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
關(guān)閉MailScanner 對(duì)郵件內(nèi)容掃描簽名
vi /etc/MailScanner/MailScanner.conf
Dangerous Content Scanning = no
對(duì)發(fā)送的郵件進(jìn)行簽名
vi /etc/Mailscanner/Mailscanner.conf
Sign Clean Messages = no
這個(gè)選項(xiàng)默認(rèn)是打開的,表示MailScanner對(duì)郵件內(nèi)容進(jìn)行掃描,但是過(guò)于嚴(yán)格了,會(huì)把很多html郵件濾掉,所以我把它關(guān)了。
systemctl restart mailscanner.service
Virus Scanners = clamd
設(shè)置殺毒軟件,如果使用clamav,則Virus Scanners = clamav。
vi /etc/MailScanner/MailScanner.conf
在2242行
Required SpamAssassin Score = 4
(高評(píng)分垃圾郵件投遞)
High Scoring Spam Actions = deliver header "X-Spam-Status:Yes"
systemctl restart mailscanner.service