Cov txheej txheem:

Yuav Ua Li Cas Tiv Thaiv Spam Siv Spamassassin, Dnsbl, thiab Procmail: 9 Kauj Ruam
Yuav Ua Li Cas Tiv Thaiv Spam Siv Spamassassin, Dnsbl, thiab Procmail: 9 Kauj Ruam

Video: Yuav Ua Li Cas Tiv Thaiv Spam Siv Spamassassin, Dnsbl, thiab Procmail: 9 Kauj Ruam

Video: Yuav Ua Li Cas Tiv Thaiv Spam Siv Spamassassin, Dnsbl, thiab Procmail: 9 Kauj Ruam
Video: Yuav ua li cas thiaj khiav dim lub ntiajteb no 2024, Hlis ntuj nqeg
Anonim
Yuav Ua Li Cas Tiv Thaiv Spam Siv Spamassassin, Dnsbl, thiab Procmail
Yuav Ua Li Cas Tiv Thaiv Spam Siv Spamassassin, Dnsbl, thiab Procmail

Kuv khiav kuv tus kheej lub server xa ntawv, thiab kuv tshawb xyuas kuv email feem ntau siv ntoo thuv. Ntau xyoo kuv tau teeb tsa spam lim hauv ntoo thuv kom tshem tawm spam. Tab sis kuv kuj tau paub siv kuv lub blackberry txhawm rau txheeb xyuas email siv squirrelmail. Zoo kuv cov lim ntoo thuv tsis ua haujlwm ntawm squirrelmail. Ntxiv rau ntau spam tau dhau los tsis ntev los no.

Cov lus qhia no yuav qhia koj yuav ua li cas teeb tsa spamassassin ntawm Fedora siv procmail kom txav cov lus cim ua spam mus rau spam nplaub tshev raug.

Kauj Ruam 1: Nruab Ua Ntej Ua Ntej

Nruab Prerequisites
Nruab Prerequisites

Koj yuav xav teeb tsa koj qhov yuav tsum tau ua ua ntej:

joe@fletcher ~ $ sudo yum nruab sendmail-cf xa email procmail spamassassin spammass-milter

Kauj ruam 2: Sendmail Configuration

Sendmail Configuration
Sendmail Configuration

Koj xav txheeb xyuas tias xa ntawv siv DNS Blacklist. Kho kom raug sendmail.mc thiab ntxiv cov kab hauv qab no joe@fletcher ~ $ vi /etc/mail/sendmail.mcFEATURE(`dnsbl ', `bl.spamcop.net',` `Spam thaiv pom: https://spamcop.net/bl.shtml? "$ & {client_addr} ') dnlFEATURE (` dnsbl', `cbl.abuseat.org ',` `Spam raug thaiv pom: https://cbl.abuseat.org/lookup.cgi?ip="$& {client_addr} ') dnlFEATURE (`dnsbl',` sbl.spamhaus.org ', `` Spam thaiv pom: https://spamhaus.org/query/bl?ip= "$ & {client_addr}') dnlFEATURE (' dnsbl ', `list.dsbl.org',` `Spam raug thaiv pom: https://dsbl.org/listing?"$&{client_addr}')dnlThaum koj qhib qhov ntawd, ntxiv procmail ua tus xa ntawv pib: MAILER (procmail) dnl npe

Kauj ruam 3: Sendmail Restart

Sendmail Pib dua
Sendmail Pib dua

Tom qab koj tau ua koj qhov kev hloov pauv xa mc cov ntaub ntawv koj yuav tsum rov pib dua qhov kev pabcuam xa ntawv kom rov tsim kho cov ntaub ntawv teeb tsa (sendmail.cf)

joe@fletcher ~ $ sudo kev pabcuam xa email rov pib dua

Kauj Ruam 4: Teeb tsa Procmail Logging

Teem Procmail Logging
Teem Procmail Logging

joe@fletcher ~ $ sudo vi /etc/procmailrcLOGFILE=/var/log/procmail.log#Uncomment hauv qab no rau kev daws teeb meem#VERBOSE = YES#LOGABSTRACT = YESKoj tuaj yeem tshawb xyuas procmail tam sim no los ntawm kev txiav cov log hauv qab/var/logjoe@fletcher ~ $ tw/var/log/procmail

Kauj Ruam 5: Hauv cheeb tsam Procmail Config

Local Procmail Config
Local Procmail Config

Tsim ib qho.procmailrc hauv koj phau ntawv teev npe tsev joe@fletcher ~ $ vi. ~/Procmailrc: 0:

X-Spam-Status: Yog

/home/joe/mail/spam

Kauj Ruam 6: Custom Milters

Kev cai Milters
Kev cai Milters

Koj yuav xav tsim cov txheej txheem kev lim dej/lim. Apache.org muaj qhov sau zoo ntawm kev tsim koj tus kheej cov cai ntawm no: Wiki Page Kuv paub tseeb tias koj tau pom tias spam yog ua raws cov qauv. Piv txwv li kuv tau txais tib spam hais txog khoom qab zib cuam tshuam nrog cov kab ntawv zoo sib xws rau ob peb hlis nyob rau ib lub sijhawm. Koj tuaj yeem sau txoj cai nrhiav ob peb yam no. joe@fletcher ~ $ sudo vi /etc/mail/spamassassin/local.cf header CANDY_1 Los ntawm = ~/nyuaj/iheader CANDY_2 Los ntawm = ~/candy/iheader CANDY_3 Subject = ~/hard/iheader CANDY_4 Subject = ~/candy/iheader CANDY_5 Subject = ~ /nroog puas tsuaj /imeta CANDY_MULTI_TEST ((CANDY_1 + CANDY_2 + CANDY_3 + CANDY_5)> 1.0) qhab nia CANDY_MULTI_TEST 5.0 Yog tias muaj ob qho ntawm cov xwm txheej saum toj no tau ntsib, tom qab ntawd kos nws ua spam. Lwm qhov kev xaiv yog ua blacklist qee cov npe: blacklist_from *@citylinenews.comOr yog tias koj paub cov ncauj lus koj tsis xav tau txais: header WARRANTY_CHECK Subject = ~ /Warranty Tsev /iscore WARRANTY_CHECK 5.0

Kauj Ruam 7: Txheeb Cov Cai

Txheeb Cov Cai
Txheeb Cov Cai

Txheeb cov cai koj tau tsim:

joe@fletcher ~ $ spamassassin --lint -D Yog tias nws tsis muaj qhov yuam kev, rov pib dua spamassassin: joe@fletcher ~ $ sudo service spamassassin restart

Kauj ruam 8: Bayes

Bayes
Bayes

Koj tuaj yeem cob qhia spamassassin txhawm rau txheeb xyuas spam siv bayesian lim.

Ua ntej taw tes nws ntawm koj cov nplaub tshev spam: joe@fletcher ~ $ sa-learn --mbox --spam/home/joe/mail/spam Tom qab ntawv koj lub inbox: joe@fletcher ~ $ sa-learn --mbox --nonspam/var /mail/joe Nws yuav pib siv cov lim thaum koj muaj> 200 spams thiab hams.

Kauj ruam 9: Ua tau

Ua tiav
Ua tiav

Txij ntawm no mus koj tau ua tiav koj thawj kauj ruam mus rau spam tsis pub dawb.

Koj yuav tsum tau saib mus rau hauv koj daim nplaub tshev spam rau thawj lub lim tiam lossis yog li pom tias txhua yam cim tias yog spam yog qhov tseeb spam. Yog tias spam tau dhau los nco ntsoov saib lub taub hau thiab pom tias muaj dab tsi koj tuaj yeem txheeb xyuas raws li tus qauv thiab sau txoj cai tshiab rau nws. Kuv feem ntau tsuas yog tus tw/var/cav/procmail thiab tshawb xyuas seb puas muaj ib qho uas tsis yog spam tau raug cim tsis raug. Hmoov zoo! -Yog

Pom zoo: