实现基于虚拟用户的邮件系统架构
生活随笔
收集整理的這篇文章主要介紹了
实现基于虚拟用户的邮件系统架构
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
?
實驗環(huán)境 [root@localhost ~]# uname -r 2.6.18-164.el5 [root@localhost ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) 要導(dǎo)入的軟件包?
?
?
?
?
一、安裝前的環(huán)境準備 1、由于電子郵件服務(wù)器依賴dns服務(wù)器,所以先安裝dns服務(wù)器: [root@localhost ~]# mkdir /mnt/cdrom [root@localhost ~]# mount /dev/cdrom /mnt/cdrom [root@localhost ~]# cd /mnt/cdrom/Server/ [root@localhost Server]# rpm -ivh bind-9.3.6-4.P1.el5.i386.rpm [root@localhost Server]# rpm -ivh bind-chroot-9.3.6-4.P1.el5.i386.rpm [root@localhost Server]# rpm -ivh caching-nameserver-9.3.6-4.P1.el5.i386.rpm 編輯dns的配置文件 [root@localhost ~]# cd /var/named/chroot/etc/ [root@localhost etc]# cp -p named.caching-nameserver.conf named.conf [root@localhost etc]# vim named.conf 15 listen-on port 53 { any; }; 27 allow-query { any; }; 28 allow-query-cache { any; }; 37 match-clients { any; }; 38 match-destinations { any; }; [root@localhost etc]# vim named.rfc1912.zones 21 zone "lee.com" IN { 22 type master; 23 file "a.org.zone"; 24 allow-update { none; }; 25 }; 39 zone "2.168.192.in-addr.arpa" IN { 40 type master; 41 file "192.168.2.zone"; 42 allow-update { none; }; 43 }; 生成域文件 [root@localhost etc]# cd ../var/named/ [root@localhost named]# cp -a localhost.zone lee.com.zone [root@localhost named]# cp -a named.local 192.168.2.zone 編輯域文件 [root@localhost named]# vim a.org.zone?
?
?
?
?
啟動dns服務(wù)器 [root@localhost named]# service named start [root@localhost named]#chkconfig named on 測試DNS服務(wù)器?
?
?
2、更改dns指向以及主機名 [root@localhost ~]# vim /etc/resolv.conf nameserver 192.168.1.100 [root@localhost ~]# vim /etc/sysconfig/network HOSTNAME=mail.lee.com [root@localhost ~]# hostname mail.a.org ##在終端上執(zhí)行這個不用在重啟系統(tǒng),重新登錄系統(tǒng)即可 3、關(guān)閉sendmail,并將它的隨系統(tǒng)自動啟動功能關(guān)閉: [root@mail ~]# service sendmail stop Shutting down sm-client: [ OK ] Shutting down sendmail: [ OK ] [root@mail ~]# chkconfig sendmail off 4、安裝所需的rpm包,這包括以下這些: httpd, php, php-mysql, mysql, mysql-server, mysql-devel, openssl-devel, dovecot, perl-DBD-MySQL, tcl, tcl-devel, libart_lgpl, libart_lgpl-devel, libtool-ltdl, libtool-ltdl-devel, expect 這里用yum進行安裝,如何搭建yum環(huán)境,以前博客中有提到過,這里就不再介紹了。 [root@mail ~]# yum install httpd php php-mysql mysql mysql-server mysql-devel openssl-devel dovecot perl-DBD-MySQL tcl tcl-devel libart_lgpl libart_lgpl-devel libtool-ltdl libtool-ltdl-devel expect –y 安裝完成之后進行設(shè)置 啟動mysql并設(shè)置為開機啟動 [root@mail ~]# service mysqld start [root@mail ~]# chkconfig mysqld on [root@mail ~]# mysql 設(shè)置mysql管理員密碼 授權(quán)本地用戶 mysql> SET PASSWORD FOR root@'localhost'=PASSWORD('redhat'); Query OK, 0 rows affected (0.00 sec) mysql> SET PASSWORD FOR root@'127.0.0.1'=PASSWORD('redhat'); Query OK, 0 rows affected (0.00 sec) 刷新數(shù)據(jù)庫 mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) 授權(quán)遠程用戶 mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'redhat'; Query OK, 0 rows affected (0.00 sec) 刷新數(shù)據(jù)庫 mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) 以上可以用下面指令代替 [root@mail ~]# mysqladmin -u root password 'redhat' 啟動saslauthd服務(wù),并將其加入到自動啟動隊列 [root@mail ~]# service saslauthd start Starting saslauthd: [ OK ] [root@mail ~]# chkconfig saslauthd on 5、查看是否安裝以下開發(fā)所用到的rpm包組: [root@mail ~]# chkconfig saslauthd on Development Libraries Development Tools Legacy Software Development X Software Development 方法: # yum groupinstall "packge_group_name" 二、安裝并配置postfix 1、新建用戶并以安全方式運行進程 [root@mail ~]# groupadd -g 2525 postfix [root@mail ~]# useradd -g postfix -u 2525 -s /sbin/nologin -M postfix [root@mail ~]# groupadd -g 2526 postdrop ##郵件投遞組 2526代表組id號,隨意起 [root@mail ~]# useradd -g postdrop -u 2526 -s /bin/false -M postdrop 2、解壓縮postfix [root@mail ~]# tar zxvf postfix-2.8.2.tar.gz -C /usr/local/src 3、編譯并安裝 [root@mail ~]# cd /usr/local/src/postfix-2.8.2/ [root@mail postfix-2.8.2]# 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' [root@mail postfix-2.8.2]# make [root@mail postfix-2.8.2]# make install 按照以下的提示輸入相關(guān)的路徑([]號中的是缺省值,”]”后的是輸入值,省略的表示采用默認值) install_root: [/] / tempdir: [/usr/local/src/ postfix-2.8.2] /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效率極低 [root@mail postfix-2.8.2]# newaliases 啟動postfix并查看25端口 [root@mail postfix-2.8.2]# postfix start postfix/postfix-script: starting the Postfix mail system [root@mail postfix-2.8.2]# netstat -tupln |less 是否支持mysql模塊 [root@mail postfix-2.8.2]# postconf –m 是否支持驗證 [root@mail postfix-2.8.2]# postconf –a 為postfix提供sysv 服務(wù)腳本 這里用拆分rpm包的方法實現(xiàn)服務(wù)腳本 [root@mail ~]# mkdir /tmp/abc [root@mail ~]# cd /tmp/abc [root@mail abc]# cp /mnt/cdrom/Server/postfix-2.3.3-2.1.el5_2.i386.rpm ./ 展開包 [root@mail abc]# rpm2cpio postfix-2.3.3-2.1.el5_2.i386.rpm |cpio –id [root@mail abc]# cd etc/rc.d/init.d/ [root@mail init.d]# cp postfix /etc/init.d/ 將此腳本copy到init.d下,并重新啟動 [root@mail init.d]# cp postfix /etc/init.d/ [root@mail ~]# service postfix restart 添加至服務(wù)管理列表,并讓其開機自動啟動 [root@mail ~]# chkconfig --add postfix [root@mail ~]# chkconfig postfix on [root@mail ~]# chkconfig --list |grep postfix postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off 4、修改配置文件 [root@mail ~]#: 修改以下幾項為您需要的配置 myhostname = mail.test.com myorigin = test.com mydomain = test.com mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 192.168.2.0/24, 127.0.0.0/8 修改好如下 75 myhostname = mail.lee.com 83 mydomain = lee.com 99 myorigin = $mydomain 113 inet_interfaces = all 161 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain 260 mynetworks = ?127.0.0.0/8 說明: myorigin參數(shù)用來指明發(fā)件人所在的域名; mydestination參數(shù)指定postfix接收郵件時收件人的域名,即您的postfix系統(tǒng)要接收到哪個域名的郵件; myhostname 參數(shù)指定運行postfix郵件系統(tǒng)的主機的主機名,默認情況下,其值被設(shè)定為本地機器名; mydomain參數(shù)指定您的域名,默認情況下,postfix將myhostname的第一部分刪除而作為mydomain的值; mynetworks 參數(shù)指定你所在的網(wǎng)絡(luò)的網(wǎng)絡(luò)地址,postfix系統(tǒng)根據(jù)其值來區(qū)別用戶是遠程的還是本地的,如果是本地網(wǎng)絡(luò)用戶則允許其訪問; inet_interfaces 參數(shù)指定postfix系統(tǒng)監(jiān)聽的網(wǎng)絡(luò)接口; 注意: 1、在postfix的配置文件中,參數(shù)行和注釋行是不能處在同一行中的; 2、任何一個參數(shù)的值都不需要加引號,否則,引號將會被當(dāng)作參數(shù)值的一部分來使用; 3、每修改參數(shù)及其值后執(zhí)行 postfix reload 即可令其生效;但若修改了inet_interfaces,則需重新啟動postfix; 4、如果一個參數(shù)的值有多個,可以將它們放在不同的行中,只需要在其后的每個行前多置一個空格即可;postfix會把第一個字符為空格或tab的文本行視為上一行的延續(xù); 修改之后重新啟動服務(wù) [root@mail ~]# service postfix restart 測試 [root@mail ~]# telnet localhost 25 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. 220 mail.lee.com ESMTP Postfix EHLO mail.a.org 250-mail.lee.org 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN mail from:root@lee.com 250 2.1.0 Ok rcpt to:lee@a.com 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> subject:Test Mail! TEST! . 250 2.0.0 Ok: queued as E7AFA7EB96 quit 221 2.0.0 Bye 切換到lee用戶進行收信 [root@mail ~]# su - lee [lee@mail ~]$ mail Mail version 8.1 6/6/93. Type ? for help. "/var/spool/mail/lee": 1 message 1 new >N 1 root@lee.com Tue Sep 11 20:10 14/442 "Test Mail!" 可以看到成功!!!!!!! 三、為postfix開啟基于cyrus-sasl的認證功能 1、使用以下命令驗正postfix是否支持cyrus風(fēng)格的sasl認證 [root@mail ~]# postconf -a cyrus dovecot 可以看到支持驗證 2.修改postfox的配置文件 260 mynetworks = 127.0.0.0/8 并添加下面內(nèi)容 ############################CYRUS-SASL############################ broken_sasl_auth_clients = yes smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available! [root@mail ~]# cd /usr/lib/sasl2/ [root@mail sasl2]# cp -p Sendmail.conf smtpd.conf [root@mail sasl2]# vim smtpd.conf 添加下面內(nèi)容 mech_list: PLAIN LOGIN 重新啟動驗證服務(wù) [root@mail ~]# service saslauthd restart Stopping saslauthd: [ OK ] Starting saslauthd: [ OK ] [root@mail ~]# chkconfig saslauthd on 讓postfix重新加載配置文件 [root@mail ~]# service postfix reload 測試 [root@mail ~]# telnet localhost 25 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. 220 mail.lee.com ESMTP Postfix EHLO mail.lee.com 250-mail.lee.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN ##說明能身份驗證 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN 四、安裝Courier authentication library 1、解壓縮 [root@mail ~]# tar jxvf courier-authlib-0.63.0.tar.bz2 -C /usr/local/src 2、編譯并安裝 [root@mail ~]# cd /usr/local/src/courier-authlib-0.63.0/ [root@mail courier-authlib-0.63.0]# ./configure \ > --prefix=/usr/local/courier-authlib \ > --sysconfdir=/etc --with-authmysql \ > --with-mysql-libs=/usr/lib/mysql \ > --with-mysql-includes=/usr/include/mysql \ > --with-redhat \ > --with-authmysqlrc=/etc/authmysqlrc \ > --with-authdaemonrc=/etc/authdaemonrc \ > --with-ltdl-lib=/usr/lib \ > --with-ltdl-include=/usr/include [root@mail courier-authlib-0.63.0]# make [root@mail courier-authlib-0.63.0]# make install 更改權(quán)限 [root@mail ~]# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon 將腳本樣本copy成所需要的腳本文件 [root@mail ~]# cp /etc/authdaemonrc.dist /etc/authdaemonrc [root@mail ~]# cp /etc/authmysqlrc.dist /etc/authmysqlrc 修改文件 [root@mail ~]# vim /etc/authdaemonrc 27 authmodulelist="authmysql" 34 authmodulelistorig="authmysql" 53 daemons=10 [root@mail ~]# vim /etc/authmysqlrc 26 MYSQL_SERVER localhost 27 MYSQL_USERNAME extmail ##這時為后文要用的數(shù)據(jù)庫的所有者的用戶名 28 MYSQL_PASSWORD extmail ##密碼 49 MYSQL_SOCKET /var/lib/mysql/mysql.sock 56 MYSQL_PORT 3306 ##指定你的mysql監(jiān)聽的端口,這里使用默認的3306 68 MYSQL_DATABASE extmail 83 MYSQL_USER_TABLE mailbox 92 MYSQL_CRYPT_PWFIELD password 113 MYSQL_UID_FIELD '2525' 119 MYSQL_GID_FIELD '2525' 128 MYSQL_LOGIN_FIELD username 133 MYSQL_HOME_FIELD concat('/var/mailbox/',homedir) 139 MYSQL_NAME_FIELD name 150 MYSQL_MAILDIR_FIELD concat('/var/mailbox/',maildir) 為courier-authlib提供sysv 服務(wù)腳本 [root@mail courier-authlib-0.63.0]# cp courier-authlib.sysvinit /etc/init.d/courier-authlib 更改權(quán)限并添加至服務(wù)管理列表,并讓其開機自動啟動 [root@mail courier-authlib-0.63.0]# chmod 755 /etc/init.d/courier-authlib [root@mail courier-authlib-0.63.0]# chkconfig --add courier-authlib [root@mail courier-authlib-0.63.0]# chkconfig --level 2345 courier-authlib on [root@mail ~]# chkconfig --list |grep courier-authlib courier-authlib 0:off 1:off 2:on 3:on 4:on 5:on 6:off 由于是源代碼安裝,形成的庫文件不是標準路徑,為了讓其他軟件包和服務(wù)調(diào)用做一下修改 [root@mail ~]# echo "/usr/local/courier-authlib/lib/courier-authlib" >> /etc/ld.so.conf.d/courier-authlib.conf [root@mail ~]# ldconfig –pv |grep cour ##查看是否導(dǎo)入 啟動服務(wù) [root@mail ~]# service courier-authlib start 新建虛擬用戶郵箱所在的目錄,并將其權(quán)限賦予postfix用戶 [root@mail ~]# mkdir -pv /var/mailbox mkdir: created directory `/var/mailbox' [root@mail ~]# chown -R postfix /var/mailbox 接下來重新配置SMTP 認證,編輯 /usr/local/lib/sasl2/smtpd.conf ,確保其為以下內(nèi)容: [root@mail ~]# vim /usr/lib/sasl2/smtpd.conf pwcheck_method: authdaemond log_level: 3 mech_list:PLAIN LOGIN authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket 可以在底行模式下用下面命令查看是否有此路徑 :.! –l /usr/ 五、讓postfix支持虛擬域和虛擬用戶 1、編輯/etc/postfix/main.cf,添加如下內(nèi)容: ########################Virtual Mailbox Settings######################## virtual_mailbox_base = /var/mailbox virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_alias_domains = virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_uid_maps = static:2525 virtual_gid_maps = static:2525 virtual_transport = virtual maildrop_destination_recipient_limit = 1 maildrop_destination_concurrency_limit = 1 ##########################QUOTA Settings######################## message_size_limit = 14336000 virtual_mailbox_limit = 20971520 virtual_create_maildirsize = yes virtual_mailbox_extended = yes virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf virtual_mailbox_limit_override = yes virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please Tidy your mailbox and try again later. virtual_overquota_bounce = yes 六、使用extman源碼目錄下docs目錄中的extmail.sql和init.sql建立數(shù)據(jù)庫 解壓縮 [root@mail ~]# tar zxvf extman-1.1.tar.gz [root@mail ~]# cd extman-1.1 [root@mail extman-1.1]# cd docs/ [root@mail docs]# mysql -u root -p <extmail.sql Enter password: [root@mail docs]# mysql -u root -p <init.sql Enter password: (前面設(shè)置的密碼redhat) 導(dǎo)入之后用下面命令驗證一下 [root@mail docs]# mysql -u root -p Enter password:?
?
?
?
把映射文件copy到/etc/postfix [root@mail docs]# cp mysql_virtual_* /etc/postfix/ 授予用戶extmail訪問extmail數(shù)據(jù)庫的權(quán)限 [root@mail docs]# mysql -u root -p Enter password: mysql> GRANT all privileges on extmail.* TO extmail@localhost IDENTIFIED BY 'extmail'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT all privileges on extmail.* TO extmail@127.0.0.1 IDENTIFIED BY 'extmail'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; ##讓設(shè)置的內(nèi)容生效 重新啟動服務(wù) [root@mail ~]# service postfix restart 說明:啟用虛擬域以后,需要取消中心域,即注釋掉myhostname, mydestination, mydomain, myorigin幾個指令;這些前面已經(jīng)做過。當(dāng)然,你也可以把mydestionation的值改為你自己需要的。 七、配置dovecot 211 mail_location = maildir:/var/mailbox/%d/%n/Maildir 795 #passdb pam { … 828 #} 869 passdb sql { 870 # Path for SQL configuration file, see doc/dovecot-sql-example.conf 871 args = args = /etc/dovecot-mysql.conf 872 } 896 #userdb passwd { … 903 #} 930 userdb sql { 931 # Path for SQL configuration file, see doc/dovecot-sql-example.conf 932 args = args = /etc/dovecot-mysql.conf 933 } … … 把userdb的其他相關(guān)禁用 創(chuàng)建dovecot-mysql.conf文件,內(nèi)容如下: [root@mail ~]# vi /etc/dovecot-mysql.conf driver = mysql connect = host=localhost dbname=extmail user=extmail password=extmail default_pass_scheme = CRYPT password_query = SELECT username AS user,password AS password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, uidnumber AS uid, gidnumber AS gid FROM mailbox WHERE username = '%u' 編輯postfix配置文件 [root@mail ~]# vim /etc/postfix/main.cf 415 home_mailbox = Maildir/ 啟動dovecot服務(wù)重啟postfix服務(wù) [root@mail ~]# service dovecot start [root@mail ~]# chkconfig dovecot on [root@mail ~]# service postfix restart 八、安裝Extmail-1.2 1.解壓縮 [root@mail ~]# tar zxvf extmail-1.2 Extmail運行在固定的目錄創(chuàng)建下面目錄,并把解壓縮文件移動到其下 [root@mail extmail-1.2]# mkdir -pv /var/www/extsuite mkdir: created directory `/var/www/extsuite' [root@mail extmail-1.2]# cd [root@mail ~]# mv extmail-1.2 /var/www/extsuite/extmail [root@mail ~]# mv extman-1.1 /var/www/extsuite/extman [root@mail ~]# cd /var/www/extsuite/ [root@mail extsuite]# cd extmail/ Copy配置文件 [root@mail extmail]# cp webmail.cf.default webmail.cf 修改配置文件 [root@mail extmail]# vim webmail.cf 77 SYS_USER_LANG = zh_CN 127 SYS_MAILDIR_BASE = /var/mailbox 139 SYS_MYSQL_USER = extmail 140 SYS_MYSQL_PASS = extmail 197 SYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket 啟動apache [root@mail extmail]# service httpd start Starting httpd: [ OK ] [root@mail extmail]# chkconfig httpd on 2.apache的相關(guān)配置 由于extmail要進行本地郵件的投遞操作,故必須將運行apache服務(wù)器用戶的身份修改為您的郵件投遞代理的用戶;本例中打開了apache服務(wù)器的suexec功能,故使用以下方法來實現(xiàn)虛擬主機運行身份的指定。此例中的MDA為postfix自帶,因此將指定為postfix用戶: [root@mail extmail]# vim /etc/httpd/conf/httpd.conf 添加一下內(nèi)容 <VirtualHost 192.168.2.101:80> ServerName mail.lee.com DocumentRoot /var/www/extsuite/extmail/html/ ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi Alias /extmail /var/www/extsuite/extmail/html SuexecUserGroup postfix postfix </VirtualHost> 可以不要SuexecUserGroup postfix postfix,但做一下修改 231 User postfix 232 Group postfix 修改 cgi執(zhí)行文件屬主為apache運行身份用戶: [root@mail extmail]# chown -R postfix.postfix /var/www/extsuite/extmail/cgi/ 重新啟動 [root@mail ~]# service httpd restart 九、安裝Extman-1.1 1.解壓縮了并把解壓縮文件copy到/var/www/extsuite下,這些第八步已經(jīng)做過 Copy配置文件并修改 [root@mail extman]# cp webman.cf.default webman.cf [root@mail extman]# vim webman.cf 12 SYS_MAILDIR_BASE = /var/mailbox ##此處即為您在前文所設(shè)置的用戶郵件的存放目錄 21 SYS_CAPTCHA_ON = 0 ##代表不需要驗證碼 修改cgi目錄的屬主 [root@mail extman]# chown -R postfix.postfix /var/www/extsuite/extman/cgi/ 在apache的主配置文件中Extmail的虛擬主機部分,添加如下兩行 ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi Alias /extman /var/www/extsuite/extman/html 創(chuàng)建其運行時所需的臨時目錄,并修改其相應(yīng)的權(quán)限 [root@mail extman]# mkdir -pv /tmp/extman mkdir: created directory `/tmp/extman' [root@mail extman]# chown postfix.postfix /tmp/extman 十、為extmail與extman打個小補丁Unix-Syslog 1、解壓縮 [root@mail ~]# tar zxvf Unix-Syslog-0.100.tar.gz 2、編譯安裝 [root@mail Unix-Syslog-0.100]# perl Makefile.PL [root@mail Unix-Syslog-0.100]# make [root@mail Unix-Syslog-0.100]# make install 十一、測試 好了,到此為止,重新啟動apache服務(wù)器后,您的Webmail和Extman已經(jīng)可以使用了, 在訪問之前在修改一下文件,驗證后面已經(jīng)做過,這里沖突,所以注釋掉。要不然不能發(fā)信。 [root@mail ~]# vim /etc/postfix/main.cf 161 #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain 修改完畢之后重啟服務(wù),現(xiàn)在可以在瀏覽器中輸入指定的虛擬主機的名稱進行訪問,如下: http://mail.lee.com 如圖:?
?
?
選擇管理即可登入extman進行后臺管理了。默認管理帳號為:root@extmail.org 密碼為:extmail*123* 如圖: 添加域lee.com 和test.com 如圖:?
轉(zhuǎn)載于:https://blog.51cto.com/5571465/992169
總結(jié)
以上是生活随笔為你收集整理的实现基于虚拟用户的邮件系统架构的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Link State ID
- 下一篇: SAS数据挖掘方法论 ─ SEMMA