五、安裝postfix管理工具
1、安裝postfix管理工具webmail來設置第一個域名和用戶
A、在http://www.toping.net/bbs/job.php?action=download&pid=tpc&tid=1469&aid=116 下載最新版的webmail4.11
B、然後用一些FTP軟件將WEBMAIL4.11到網站根目錄
C、然後解壓
#tar zxvf webmail4.11.tar.gz
D、然後修改config/config.inc.php中的
define(MYSQL_HOST, ‘localhost’); 為 您的MySQL服務器的主機名
define(MYSQL_USER, ‘postfix’); 為 您的MySQL的用戶名 define(MYSQL_PASS, ‘postfix’); 為 您的MySQL的密碼 define(MYSQL_DATA, ‘postfix’); 為 您的郵件服務器的數據庫 |
同樣修改 webadmin/include/config.inc.php
define(MYSQL_HOST, ‘localhost’); 為 您的MySQL服務器的主機名
define(MYSQL_USER, ‘postfix’); 為 您的MySQL的用戶名
define(MYSQL_PASS, ‘postfix’); 為 您的MySQL的密碼
define(MYSQL_DATA, ‘postfix’); 為 您的郵件服務器的
為了使webmail4.11支持php5 ,對webmail4.11作下面修改:
修改config/db_mysql.php 文件,將54行的
if (!isset($this->Link_ID)){
改成
if (!is_object($this) || !isset($this->Link_ID)){
同樣在webmain/include/db_mysql.php文件,將54行的
if (!isset($this->Link_ID)){
改成
if (!is_object($this) || !isset($this->Link_ID)){
數據庫修改完成後運行:http://172.16.16.205/webadmin/index.php
完裝完成!!
2、用戶登錄測試
用戶登錄測試
A、安裝p5-MIME-Base64
# cd /usr/ports/converters/p5-MIME-Base64/
# make install clean
通過p5-MIME-Base64來取得用戶名和密碼的base64編碼
# perl -MMIME::Base64 -e ‘print encode_base64(“webmaster\@toping.net”);’
d2VibWFzdGVyQHRvcGluZy5uZXQ=
# perl -MMIME::Base64 -e ‘print encode_base64(“000000”);’
MDAwMDAw
B、測試發送郵件(端口:25):
# telnet 127.0.0.1 25
Trying 127.0.0.1…
Connected to 0.
Escape character is ‘^]’.
220 mail.toping.net ESMTP Postfix
ehlo mail
250-mail.toping.net
250-PIPELINING
250-SIZE 4194304
250-VRFY
250-ETRN
250-AUTH NTLM LOGIN PLAIN OTP
250-AUTH=NTLM LOGIN PLAIN OTP
250 8BITMIME
auth login
334 VXNlcm5hbWU6
d2VibWFzdGVyQHRvcGluZy5uZXQ= //此為用戶名id:webmaster@toping.net
334 UGFzc3dvcmQ6
MDAwMDAw //此為用戶密碼password:000000
235 Authentication successful
MAIL FROM:<webmaster@toping.net> //告訴服務器發件人的Email地址
250 Ok
RCPT TO:<webmaster@toping.net> //告訴服務器收件人的地址
250 OK
DATA //告訴服務器開始寫信
354 End data with <CR><LF>.<CR><LF>
SUBJECT:test //subject後面填寫的是郵件的主題
test
. //換行後輸入.後按回車,表示信件內容書寫完畢
250 Ok: queued as 58DC71D5
quit //發送信件,結束對話,退出SMTP服務器
221 Bye
Connection closed by foreign host
C、測試收取郵件(端口:110):
# telnet 127.0.0.1 110
Trying 127.0.0.1…
Connected to 0
Escape character is ‘^]’
+OK Hello there
user webmaster@toping.net
+OK Password required
pass 000000
+OK logged in
list
+OK POP3 clients that break here, they violate STD53
1 2217
.
retr 1 //返回第一封信的全部內容
+OK 2217 octets follow.
Return-Path: <webmaster@toping.net>
X-Original-To: webmaster@toping.net
Delivered-To: webmaster@toping.net
Received: from mail (localhost.toping.net [127.0.0.1])
by mail.toping.net (Postfix) with ESMTP id 58DC71D5
for <webmaster@toping.net>; Mon, 9 Aug 2004 21:11:20 +0800 (CST)
SUBJECT:test
Message-Id: <20040809131120.58DC71D5@mail.toping.net>
Date: Mon, 9 Aug 2004 21:11:20 +0800 (CST)
From: webmaster@toping.net
To: undisclosed-recipients:;
test
.
dele 1 //刪除
+OK Deleted
quit
+OK Bye-bye
Connection closed by foreign host
也可以使用任何其它的郵件客戶端程序來測試,如Foxmail、Outlook Express等等。
修改apache的配置文件httpd.conf .修改apache 的啟動用戶與組.
#vi /usr/local/etc/apache22/httpd.conf
將Group www、User www修改為: Group postfix、User postfix
以下文章點擊率最高
Loading…