欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Linux服務(wù)器中如何使用郵件服務(wù)spam

這篇文章給大家介紹Linux服務(wù)器中如何使用郵件服務(wù)spam,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。

創(chuàng)新互聯(lián)專注于潁東網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供潁東營銷型網(wǎng)站建設(shè),潁東網(wǎng)站制作、潁東網(wǎng)頁設(shè)計、潁東網(wǎng)站官網(wǎng)定制、成都小程序開發(fā)服務(wù),打造潁東網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供潁東網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

安裝spam

spam(SpamAssassin)利用perl來進(jìn)行文字分析,他會檢測郵件的標(biāo)題、內(nèi)容、送信人,這樣就可以過濾出垃圾郵件

1、安裝spam。由于spam的依賴太多,用戶一定要使用yum源來安裝,這樣減少不必要的麻煩 

[root@localhost ~]# rpm -qa | grep spamassassin

[root@localhost openwebmail]# yum install -y spamassassin

Complete!

2、配置postfix使用spam功能,修改配置文件“/etc/postfix/master.cf”

[root@localhost ~]# gedit /etc/postfix/master.cf

smtp      inet  n      -       n       -      -       smtpd  -o content_filter=spamassassin

spamassassin unix - n n  - - pipe user=nobody argv=/usr/bin/spamc -f /usr/sbin/sendmail -oi -f $(sender) -- $(recipient)  //追加到最后一行

3、重啟postfix 

[root@localhost openwebmail]# service postfix restart

關(guān)閉postfix                                            [確定]

啟動postfix                                            [確定]

[root@localhost openwebmail]#

4、啟動spam服務(wù)

[root@localhost ~]# service spamassassin start

啟動spamassassin                                            [確定]

[root@localhost ~]#

5、測試?yán)]件。

1)spamassassin為我們提供了一個垃圾郵件的模板“sample-spam.txt”,我們可以使用此模板的內(nèi)容來發(fā)送

[root@localhost openwebmail]# cat /usr/share/doc/spamassassin-3.3.1/sample-spam.txt 

Subject: Test spam mail (GTUBE)

Message-ID: <GTUBE1.1010101@example.net>

Date: Wed, 23 Jul 2003 23:30:00 +0200

From: Sender <sender@example.net>

To: Recipient <recipient@example.net>

Precedence: junk

MIME-Version: 1.0

Content-Type: text/plain; charset=us-ascii

Content-Transfer-Encoding: 7bit

 

This is the GTUBE, the

    Generic

    Test for

    Unsolicited

    Bulk

    Email

If your spam filter supports it, the GTUBE provides a test by which you

can verify that the filter is installed correctly and is detecting incoming

spam. You can send yourself a test mail containing the following string of

characters (in upper case and with no white spaces and line breaks):

 

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X      //這就是垃圾郵件的內(nèi)容

 

You should send this test mail from an account outside of your network.

2)使用openwebmail發(fā)信

Linux服務(wù)器中如何使用郵件服務(wù)spam

3)查看郵箱的日志文件。Spam采用積分制,默認(rèn)超過5分就是垃圾郵件,而我們看到下面識別出的郵件是999分,很明顯是垃圾郵件

[root@localhost openwebmail]# cat /var/log/maillog

Aug 21 08:44:14 localhost spamd[6401]: spamd: failed to create readable default_prefs: //.spamassassin/user_prefs

Aug 21 08:44:14 localhost spamd[6401]: spamd: processing message <20180821004332.M42441@mailsrv.david.cn> for nobody:99

Aug 21 08:44:26 localhost spamd[6401]: spamd: identified spam (999.0/5.0) for nobody:99 in 12.5 seconds, 603 bytes.

Aug 21 08:44:26 localhost spamd[6401]: spamd: 

result: Y 999 – 

ALL_TRUSTED,GTUBE,TVD_SPACE_RATIO scantime=12.5,size=603,user=nobody,uid=99,required_score=5.0,rhost=localhost,raddr=127.0.0.1,

rport=33149,mid=<20180821004332.M42441@mailsrv.david.cn>,autolearn=no

Aug 21 08:44:26 localhost postfix/pipe[6443]: 3F2FD14141A: to=<david@mailsrv.david.cn>,

relay=spamassassin, delay=13, delays=0.06/0.03/0/12, dsn=2.0.0, status=sent (delivered via spamassassin service)

Aug 21 08:44:26 localhost postfix/qmgr[6368]: 3F2FD14141A: removed

Aug 21 08:44:26 localhost spamd[6399]: prefork: child states: II

關(guān)于Linux服務(wù)器中如何使用郵件服務(wù)spam就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

分享題目:Linux服務(wù)器中如何使用郵件服務(wù)spam
分享URL:http://chinadenli.net/article6/iphhig.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司服務(wù)器托管靜態(tài)網(wǎng)站用戶體驗外貿(mào)建站自適應(yīng)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)公司