歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RHEL5上安裝Extmail郵件系統

RHEL5上安裝Extmail郵件系統

日期:2017/2/28 16:11:44   编辑:Linux教程

Extmail 是一個以perl語言編寫,面向大容量/ISP級應用,免費的高性能Webmail軟件。它以GPL版權釋出,設計初衷是希望設計一個適應當前高速發展的IT應用環境,滿足用戶多變的需求,能快速進行開發、改進和升級,適應能力強的webmail系統。

Extmail還被設計成一個能夠替代目前國內外一些主流webmail軟件的系統,例如:SqWebMail,OpenWebmail及squirrel,Igenus等。

流行在互聯網上的Unix平台webmail軟件相當多,有的功能還非常強大,但在實際的應用中,尤其是在ISP、企業郵局、辦公郵件平台等要求較高的環境下,這些webmail軟件就暴露了很多不足,有的安裝要求高、軟件包依賴多,有的沒實現模板化導致修改困難,有的速度慢,有的功能太簡單,有的兼容性差,有的對郵件解析的能力弱,還有大量的並不支持多語言顯示。

因此,為了適應嚴格的IT應用環境,我們迫切需要一個擁有實用的功能,便於修改,速度快而穩定,兼容性好,能適應多國郵件的webmail系統,Extmail就是在這樣的需求下被設計的。

好了,現在開始安裝我們的Extmail,管理我們自己的郵件服務器。

一、安裝前的准備工作: 1、安裝所需的rpm包,這包括以下這些:

httpd, php, php-mysql, mysql, mysql-server, mysql-devel, openssl-devel, dovecot, perl-DBD-MySQL, tcl, tcl-devel, libart, libart-devel

2、關閉sendmail,並將它的隨系統自動啟動功能關閉:

# service sendmail stop

# chkconfig sendmail off

3、安裝以下開發所用到的rpm包組:

Development Libraries

Development Tools

Legacy Software Development

X Software Development

方法:

# yum groupinstall "packge_group_name"

4、啟動mysql數據庫,並給mysql的root用戶設置密碼:

# service mysqld start

# chkconfig mysqld on

# mysqladmin -uroot password 'your_password'

二、安裝配置postfix

# groupadd -g 2525 postfix

# useradd -g postfix -u 2525 -s /sbin/nologin -M postfix

# groupadd -g 2526 postdrop

# useradd -g postdrop -u 2526 -s /bin/false -M postdrop

# tar zxvf postfix-2.6.5.tar.gz

# cd postfix-2.6.5

# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto'

# make # make install 按照以下的提示輸入相關的路徑([]號中的是缺省值,”]”後的是輸入值,省略的表示采用默認值)   install_root: [/] /

  tempdir: [/usr/local/src/ postfix-2.6.5] /tmp

  config_directory: [/etc/postfix] /etc/postfix

  daemon_directory: [/usr/libexec/postfix]   command_directory: [/usr/sbin]   queue_directory: [/var/spool/postfix]   sendmail_path: [/usr/sbin/sendmail]   newaliases_path: [/usr/bin/newaliases]   mailq_path: [/usr/bin/mailq]   mail_owner: [postfix]   setgid_group: [postdrop] html_directory: [no] /var/www/postfix_html manpages: [/usr/local/man] readme_directory: [no] 生成別名二進制文件,這個步驟如果忽略,會造成postfix效率極低: # newaliases 2.進行一些基本配置,測試啟動postfix並進行發信

#vi /etc/postfix/main.cf

修改以下幾項為您需要的配置

myhostname = mail.test.com

myorigin = test.com

mydomain = test.com

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mynetworks = 192.168.1.0/24, 127.0.0.0/8

說明: myorigin參數用來指明發件人所在的域名; mydestination參數指定postfix接收郵件時收件人的域名,即您的postfix系統要接收到哪個域名的郵件; myhostname 參數指定運行postfix郵件系統的主機的主機名,默認情況下,其值被設定為本地機器名; mydomain參數指定您的域名,默認情況下,postfix將myhostname的第一部分刪除而作為mydomain的值; mynetworks 參數指定你所在的網絡的網絡地址,postfix系統根據其值來區別用戶是遠程的還是本地的,如果是本地網絡用戶則允許其訪問; inet_interfaces 參數指定postfix系統監聽的網絡接口; 注意: 1、在postfix的配置文件中,參數行和注釋行是不能處在同一行中的; 2、任何一個參數的值都不需要加引號,否則,引號將會被當作參數值的一部分來使用; 3、每修改參數及其值後執行 postfix reload 即可令其生效;但若修改了inet_interfaces,則需重新啟動postfix; 4、如果一個參數的值有多個,可以將它們放在不同的行中,只需要在其後的每個行前多置一個空格即可;postfix會把第一個字符為空格或tab的文本行視為上一行的延續; 啟動postfix /usr/local/postfix/sbin/postfix start 連接postfix,驗正服務啟動狀況:

# telnet localhost 25

Trying 127.0.0.1...

Connected to localhost.localdomain (127.0.0.1).

Escape character is '^]'.

220 mail.test.com ESMTP Postfix

ehlo mail.test.com 250-mail.test.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN

mail from:[email protected]

250 2.1.0 Ok

rcpt to:[email protected]

250 2.1.5 Ok

data

354 End data with <CR><LF>.<CR><LF>

subject:Mail test! Mail test!!! .

250 2.0.0 Ok: queued as AB94A1A561

quit

221 2.0.0 Bye

Connection closed by foreign host.

切換到redhat用戶進行收信: # su - redhat $ mail Mail version 8.1 6/6/93. Type ? for help.

"/var/spool/mail/redhat": 1 message 1 new

>N 1 [email protected] Wed Sep 5 10:59 15/488 "Mail test!"

&
Copyright © Linux教程網 All Rights Reserved