歡迎您光臨本站 註冊首頁

反垃圾郵件防火牆ASSP(Anti-Spam Smtp Proxy)

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

反垃圾郵件防火牆ASSP(Anti-Spam Smtp Proxy)

項目首頁:
assp.sourceforge.net



What features make ASSP great?
1. Easy browser-based setup (optional).
2. Uses your existing message transport and existing SMTP server.
3. Works with Sendmail, qmail, Postfix, Imail, Exchange, Courier, Mercury, Lotus Notes, and all other standard SMTP servers.
4. Runs on Linux, Unix, Windows, OS X, OS/2, and more.
5. Automatically customizes to your site's unique email profile.
6. Automatic whitelist -- noone you email will ever be blocked.
7. Senders receive immediate notification if mail is blocked but no erroneous bounces are ever generated.
8. Basic anti-virus filtering using the ClamAV virus databases.
9. Redlist keeps an address off the whitelist.
10. No-processing addresses pass through.
11. Makes use of honeypot type spambucket addresses to automatically recognize spam and update your spam database.
12. Bayesian filter intelligently classifies email into spam and non-spam.
13. Supports additional site-defined regular expressions to identify spam or non-spam email.
14. Can optionally block all non-whitelisted email (for anti-spam zelots).
15. Mime encoded and other camouflaged spam is also recognized.
16. Automatically maintains the spam and non-spam databases.
17. Accepts whitelist submissions and spam error reports by authorized email.
18. Optionally rejects executable attachments from non-whitelisted (or all) addresses.
19. Free (as in speech) software -- Licensed under the GPL.
20. Practically no maintenance required.
21. Active user community and email list for support questions.
22. Source code included if you need to customize your installation.
23. Runs as a service in Windows NT / 2000.
24. Optionally blocks no mail but adds an email header and/or updates the message subject.
25. Optionally uses community-based spam statistics to identify hosts that are likely to send spam or non-spam mail.
26. In *nix environments can switch to non-root user. Also supports chroot jail.
27. Individual users can be configured to receive all mail.
28. Shows detailed analysis of spam rating process for specific messages.
29. Option to forward a copy of every rejected mail to an address.
30. No perl modules to install -- runs complete "out of the box".
31. Can block spam-bombs (when spammers forge your domain in the from field).
32. Keeps spam statistics for your site.
33. Detailed up-to-date documentation.
34. Can listen on more than one smtp port.
35. And much more!


安裝方便,down下來解包就可運行。
使用perl編寫,也支持windows平台。
配置界面非常酷:

[ 本帖最後由 busyant 於 2006-7-11 17:40 編輯 ]
《解決方案》

好東東

一些小型郵件伺服器上用得著
《解決方案》

才看了一下,發現都是zip的包?
《解決方案》

有沒有安裝說明啊,我下載了,不能安裝,以下是網上轉載.第一步就不能完成,ASSP.CFG文件找不到修改的參數.求高手指點.

ASP 係以 Perl 語言寫成, 是一套開放源碼、跨平台且功能強大的垃圾郵件過濾軟體. 在郵件進入到 MTA (如: Sendmail、Exchange) 前利用 ASSP 過濾病毒、垃圾郵件, 可減輕 Mail Server 的負擔. 由於 ASSP 的強效, 使用前須謹慎調整相關設定, 以免無法收信或誤刪重要郵件.

本篇係以 Fedora Core 3 + Sendmail 環境為主, Windows 環境的建置請參考 ASSP Documentation: ASSP on Win32 - a quick install guide.

<DIV id=a000134more>
配置說明

ASSP 與 Sendmail 安裝在不同電腦上的使用範例: (建議)

Internet
 ↓
NAT / Firewall (redirect smtp port (TCP 25) to ASSP:25)
 ↓
ASSP (port: 25, with VirusDB)
 ↓
Sendmail (port: 25, with MailScanner + ClamAV)
 ↓
Outlook Express (with SpamPal + AntiVirus Software)

ASSP 與 Sendmail 安裝在同一部電腦上的使用範例:

Internet
 ↓
NAT / Firewall (redirect smtp port (TCP 25) to ASSP:25)
 ↓
ASSP (port: 25, with VirusDB)
 ↓
Sendmail (port: 125, with MailScanner + ClamAV)
 ↓
Outlook Express (with SpamPal + AntiVirus Software)

Link: 圖例說明

ps. SpamPal 請參考: SpamPal Homepage; MailScanner + ClamAV 請參考: Sendmail + MailScanner + ClamAV 安裝實錄

安裝 ASSP

至 http://sourceforge.net/project/showfiles.php?group_id=69172 下載 ASSP, 本篇以 1.1.1 版為例

cd /opt
wget http://nchc.dl.sourceforge.net/sourceforge/assp/assp-1.1.1.zip
unzip assp-1.1.1.zip -d ./assp

cd assp
chmod a+x freshclam.sh
./freshclam.sh

perl assp.pl (產生 assp.cfg)
Ctrl + C

vi assp.cfg
將 allowAdminConnectionsFrom:= 改成如下:
allowAdminConnectionsFrom:=127.0.0.1|192.168. (讓 LAN 可以連入管理)

perl assp.pl
開啟瀏覽器, 連結 http://assp.host.ip.addr:55555
預設密碼: nospam4me

修改設定

主選單 項目 assp.cfg 對應參數 修改值
Network Setup SMTP Destination smtpDestination 填入 Mail Server IP 與埠號. 如: 192.168.1.1:25 或 127.0.0.1:125
Listen Port listenPort 25
As a Daemon AsADaemon 1 (勾選)
Whitelist Whitelisted Domains* whiteListedDomains 允許寄入的 domain name
Relaying Accept All Mail* acceptAllMail 允許寄入的 mail server ip
Local Domains* localDomains 填入本地 domain name
Validate Recipients Do LDAP lookup for valid recipients DoLDAP 清除值 (取消勾選)
Security Web Admin Password webAdminPassword 變更 web 管理密碼

ps. 標註 " * " 的欄位表示可以填入多個值, 以 " | " 符號 (前後無空格) 隔開

安裝相關 Perl 模組 (Optional)

cpan
Are you ready for manual configuration? ==> no
cpan> install Email::Valid
cpan> install Mail::Address
cpan> install Net::DNS
cpan> install Net::Domain::TLD

ps. 亦可至 http://search.cpan.org/ 自行下載、安裝相關模組, 安裝方式為: 解包 → perl Makefile.PL && make && make install

變更 sendmail 使用 port

vi /etc/mail/sendmail.mc
將 DAEMON_OPTIONS('Port=smtp,Addr=0.0.0.0, Name=MTA') 改成
DAEMON_OPTIONS('Port=125,Addr=0.0.0.0, Name=MTA')

m4 sendmail.mc > sendmail.cf
service sendmail restart

允許 ASSP Host Relay

當 ASSP Host 與 Mail Server 不在同一部電腦時, 須在 Mail Server 設定允許 ASSP Host 的 Relay. 以 Sendmail 為例:

cd /etc/mail
vi access

127.0.0.1  Relay
<your.assp.host.ip>  Relay

makemap hash access < access

建立 spam 資料庫

剛開始運行 ASSP 的前幾天, 建議以 Test Mode 來運作, 目的是避免 ASSP 誤刪正式郵件, 並且蒐集 spam mail 來建立 spam 資料庫.
在蒐集大量的 spam 郵件, 並且確定 spam 資料夾裡的郵件都是垃圾信後, 執行: perl rebuildspamdb.pl 即可建立 spam 資料庫

執行完 rebuildspamdb 後即可清除 spam / notspam 郵件檔
cd /opt/assp/spam
rm -rf -- *
cd ../notspam
rm -rf -- *

ps. "-" 開頭的檔名要加 "--" 參數才能處理

由於中文郵件主旨存成的檔名都是亂碼, 以主旨來當檔名沒啥意義,
可取消勾選 SPAM Control 選單裡的 Use Subject as Maillog Names (assp.cfg => UseSubjectsAsMaillogNames)
則存在 spam / notspam 裡的郵件檔案會以流水號為檔名

以上動作可排程處理: 每週或每半個月執行一次 (間隔時間越長, 蒐集到的 spam mail 越完整, 但是 rebuild 資料庫的時間也越長)

另外要排程處裡的是 freshclam.sh 讓系統自動更新病毒資料庫

/etc/crontab:
0 0 * * 0 root cd /opt/assp; ./rebuildspamdb.sh (每週日凌晨重建 spamdb)
0 */3 * * * root cd /opt/assp; ./freshclam.sh (每三小時執行一次 freshclam.sh, 若病毒資料庫有更新就下載)

rebuildspamdb.sh:
#!/bin/bash

cd /opt/assp
/usr/bin/perl rebuildspamdb.pl
rm -rf -- ./spam/*
rm -rf -- ./notspam/*

從 /opt/assp/maillog.txt 觀察 ASSP 的運作 (執行 tail -f maillog.txt 或 less +F maillog.txt 持續監控 log 訊息), 當一切妥當時即可取消 Test Mode (在 TestMode Options 中取消勾選所有 Test Mode 項目)

取消 Test Mode 後若有誤刪正式郵件的情況, 可從 Whitelist Options 或 Relaying 選單中變更相關設定

以上是小弟我個人的使用備忘, 如有錯誤敬請不吝指正, 謝謝!
《解決方案》

我的blog有比較詳細的安裝和測試報告的 busyant.cublog.cn
_____________________________________________
非宣傳帖噢?

[ 本帖最後由 busyant 於 2007-3-27 09:25 編輯 ]
《解決方案》

樓上的去你博客沒找到,能不能給個連接啊.
《解決方案》

        ASSP在現有系統上的安裝配置簡要步驟:
1.        從assp.sourceforge.net獲取assp安裝包;
2.        解壓縮安裝包到安裝路徑;
3.        運行安裝包內的assp.pl腳本,將會產生assp.cfg文件;
4.        使用瀏覽器訪問地址http://ASSPHOST:55555,用戶名任意輸入,初始密碼nospam4me;
5.        在network setup內設置目標系統的ip地址與埠;
6.        在Relaying中設置本地域XXX.com,XXX.com.cn等。
7.        添加RBL使用的服務商地址;
8.        在Relaying的Accept All mail中添加IP白名單。
9.        在TestMode options內,將狀態設置為testmode;(僅標記,而不阻擋任何郵件)

10.        在Email Interface內指定接受內部用戶報告黑白名單和(非)垃圾郵價的地址。
11.        在郵件伺服器內添加對應的報告帳號,並將接收到的郵件轉發到ASSP的Email Interface指定的帳號;
12.        設置定期任務,定期執行assp目錄下的rebuildspamdb.pl並清空spam、notspam、errors/spam、errors/notspam目錄下的所有文件。
13.        測試和學習期完畢後去掉Test Mode。並設置Send All spam/ham內的Address to CC All Spam地址,將所有被阻擋的郵件發送到該地址,並保留一定時間。
14.        通過安裝特定的perl模塊,可以使ASSP支持更多的功能。



大致就是這個樣子,最開始的時候assp.cfg文件是沒有的,只需要運行一次assp.pl就生成了。
上面第10--11步是我在對我的伺服器作方案時設計的,可以忽略,或僅供參考。

我blog上的文檔路徑:
ASSP反垃圾郵件防火牆安裝日記<一> :  http://blog.chinaunix.net/u/1492/showart.php?id=143270
ASSP反垃圾郵件防火牆安裝日記<二> : http://blog.chinaunix.net/u/1492/showart.php?id=145159

[ 本帖最後由 busyant 於 2007-3-27 09:05 編輯 ]
《解決方案》

請問一下
這裡
http://blog.chinaunix.net/u/1492/showart.php?id=145159

請問一下假設「沒有」使用assp前 mailserver的ip是192.168.1.1

如果使用ASSP后,  ASSP和Mailserver的ip是什麼?(ASSP是不是設置為透明)

1、 進來的郵件:Internet====〉ASSP=====〉Mailserver======〉Local user;
  出去的郵件:Local user=====〉ASSP======〉Mailserver====〉Internet;

[ 本帖最後由 sosogh 於 2007-3-27 23:46 編輯 ]
《解決方案》

mail server的IP你可以不動。
ASSP的IP你可以隨便設,但是:
mx記錄要從192.168.1.1改到ASSP的IP去,使得你可以接受「進來的郵件」。
mail.XXX.com,smtp.XXX.com等等,你所有的用戶發郵件時使用的域名,都應該指向ASSP的IP,這樣用戶的郵件就全部通過ASSP再轉發到mail sever,然後由mail server發送出去。
注意pop3.XXX.com域名還是應該指向mail server,否則用戶接收郵件會有問題。
《解決方案》

謝謝!
請問一下busyant兄
當第一次使用貝葉斯的時候,要初始化spamd垃圾庫,rebuildspamd的時候,會去找spam和notspam中的郵件,請問這2個文件夾的郵件,你是如何提交的?
是自己手動把outlook中的郵件放上去,還是系統自動提交上去的

[ 本帖最後由 sosogh 於 2007-4-9 10:37 編輯 ]

[火星人 ] 反垃圾郵件防火牆ASSP(Anti-Spam Smtp Proxy)已經有1666次圍觀

http://coctec.com/docs/service/show-post-17784.html