http://web.onda.com.br/orso/index.html
【架設環境】
FreeBSD 5.1 Release
Postfix 2.0.13
mailmgr-1.2.3
【版豬的架設環境也測試過了】
FreeBSD 4.8 Release
sendmail-8.12.10
mailmgr-1.2.3
【開始實作】
1.下載源碼
#cd /tmp
#fetch [url]http://web.onda.com.br/orso/mailmgr-1.2.3.tar.gz[/url]
#tar zxvf mailmgr-1.2.3.tar.gz
2.中文化源碼
(1).在languages目錄中建立Big5.h檔並編輯,其內容如下:
#cd /tmp/mailmgr-1.2.3/languages/
#cp cp English.h Big5.h
#vi Big5.h
/*
正體中文 by Albert Lu <albert.AT.it543.idv.tw>
*/
#if defined(Big5)
char *yes = "確定";
char *no = "取消";
char *language="正體中文";
char *msg01="Could not open file";
char *msg02="none@none";
char *msg03="Missing email domain in mailmgr.conf file (email_domain tag) and
/etc/sendmail.cw file not found";
char *msg04="Malloc error";
char *msg05="Successfull report generated on";
char *htm01 = "使用者";
char *htm02 = "期間";
char *htm03 = "類別";
char *htm04 = "Report";
char *htm05 = "序號";
char *htm06 = "使用者";
char *htm07 = "MESSAGES";
char *htm08 = "送出";
char *htm09 = "接收";
char *htm10 = "BYTES";
char *htm11 = "總計";
char *htm12 = "轉送";
char *htm13 = "FILE/PERIOD";
char *htm14 = "建立時間";
char *htm15 = "Generated by";
char *htm16 = "on";
char *htm17 = "FROM";
char *htm18 = "TO";
char *htm19 = "日期";
char *htm20 = "時間";
#endif
(2)修改Big5.h
#chmod 700 Big5.h
(3)編輯/tmp/mailmgr-1.2.3/include目錄中language.h檔,在檔案中加入以下參數
#if defined(Big5)
#include "./languages/Big5.h"
#endif
(4)編輯/tmp/mailmgr-1.2.3/configure檔,在檔案的1295行中加入以下參數
|| test "$enableval" = "Big5"
(5)編輯/tmp/mailmgr-1.2.3/configure.in檔,在檔案的52行中加入以下參數
|| test "$enableval" = "Big5"
3.開始安裝
#cd /tmp/mailmgr-1.2.3
#./configure --enable-language=Big5
#make install
4.建立mailmgr目錄
#mkdir /usr/local/www/data/mailmgr
5.在/usr/local/etc/postfix/目錄下,建立local-host-names檔案,其內容如下:
如果你是sendmail的話應該原本就有這個檔案了.
your.domain #改成你的Domain
6.編輯/usr/local/etc/mailmgr.conf ,修改以下部分
logfile /var/log/maillog
temporary_dir /tmp
output_dir /usr/local/www/data/mailmgr <===特別注意這邊是你網頁放的位置
local-host-names /usr/local/etc/postfix/local-host-names
lastlog 0
overwrite_report yes
email_domain your.domain #改成你的Domain
use_sendmail_cw no
title "XXX -- 電子郵件使用紀錄" #將XXX改成你的Domain
7.第一次執行
#/usr/local/bin/mailmgr
8.加入排程,每日執行一次
# crontab -e
加入以下內容
59 23 * * * /usr/local/bin/mailmgr
9.在完成上面的步驟後, 您可以連線到http://your_server_hostname/mailmgr/ ,看看成
果囉!
--
┌─────◆KKCITY◆─────┐ ╱ ╱  ̄ ▌ ̄  ̄ ╲╱ BBS 城邦
│ bbs.kkcity.com.tw │ ╲ ╲ ╴ ▌ ▌ ▏ KK免費撥接
└──《From:220.130.18.230 》──┘ http://www.kkcity.com.tw/freeisp/
這一套 Mail 的分析工具是專門開發給Sendmail使用,但由於筆者是使用Postfix,就在實
驗的心態下,試著裝裝看,結果是可行的,以下就是實作的筆記。
官方網站: