`

Extmail企业邮箱构建指南

 
阅读更多

本文将详细介绍如何使用postfix,extman,extmail等一系列开源软件构建适合企业应用的邮件系统,测试服务器平台为RHEL5.4 32位操作系统,在开始之前,请部署好LAMP环境,这方面的介绍可以参考我的另一篇文章:http://ylw6006.blog.51cto.com/470441/657907,如果要做到收发邮件均没有问题,需要DNS的邮件交换记录(MX)支持,这方面的设置不在本文中介绍…

一:安装courier-authlib

  1. 1:使用该验证库,可以使用mysql验证邮件账户  
  2. [root@orcl ~]# cd /usr/local/src/tarbag  
  3. [root@orcl tarbag]# wget http://sourceforge.net/projects/courier/files/authlib/0.64.0/courier-authlib-0.64.0.tar.bz2/download   
  4. [root@orcl tarbag]# tar -jxvf courier-authlib-0.64.0.tar.bz2 -C ../software/  
  5. [root@orcl tarbag]# cd ../software/courier-authlib-0.64.0/  
  6. [root@orcl courier-authlib-0.63.0]# groupadd postfix  -g 1000  
  7. [root@orcl courier-authlib-0.63.0]# groupadd vmail    -g 1001  
  8. [root@orcl courier-authlib-0.63.0]# groupadd postdrop -g 1002  
  9. [root@orcl courier-authlib-0.63.0]# useradd  -u 1001  -g 1000 vmail  
  10. [root@orcl courier-authlib-0.63.0]# useradd  -u 1000  -g 1000 postfix  
  11. [root@orcl courier-authlib-0.63.0]# id vmail  
  12. uid=1001(vmail) gid=1000(postfix) groups=1000(postfix)  
  13. [root@orcl courier-authlib-0.63.0]# id postfix  
  14. uid=1000(postfix) gid=1000(postfix) groups=1000(postfix)  
  15.  
  16. [root@orcl courier-authlib-0.63.0]# ./configure --with-ltdl-lib=/usr/lib64   --prefix=/usr/local/courier-authlib --with-mailuser=vmail --with-mailgroup=vmail   --sysconfdir=/etc    --without-authpam    --without-authldap    --without-authpwd    --without-authshadow    --without-authvchkpw --without-authpgsql --with-authmysql    --with-mysql-libs=/usr/local/mysql/lib/mysql    --with-mysql-includes=/usr/local/mysql/include/mysql --with-redhat    --with-authmysqlrc=/etc/authmysqlrc --with-authdaemonrc=/etc/authdaemonrc    CFLAGS="-march=i686 -O2 -fexpensive-optimizations" CXXFLAGS="-march=i686 -O2 -fexpensive-optimizations"    
  17.  
  18. [root@orcl courier-authlib-0.63.0]# make && make install  
  19. [root@orcl courier-authlib-0.63.0]# ls /usr/local/courier-authlib/  
  20. bin  include  lib  libexec  sbin  share  var  
  21.  
  22. [root@orcl courier-authlib-0.63.0]# echo  '/usr/local/courier-authlib/lib/courier-authlib/' >> /etc/ld.so.conf  
  23. [root@orcl courier-authlib-0.63.0]# ldconfig   
  24.  
  25. 备注:如果是64位系统,需要将i686修改位x86-64,各编译选项的含义可以使用./configrue --help来获取  
  26.  
  27. 2:修改authlib库相关配置文件  
  28. [root@orcl ~]# cp /etc/authdaemonrc.dist /etc/authdaemonrc  
  29. [root@orcl ~]# grep -v '^#' /etc/authdaemonrc |grep -v '^$'  
  30. authmodulelist="authmysql" 
  31. authmodulelistorig="authmysql" 
  32. daemons=5 
  33. authdaemonvar=/usr/local/courier-authlib/var/spool/authdaemon  
  34. DEBUG_LOGIN=0 
  35. DEFAULTOPTIONS="" 
  36. LOGGEROPTS="" 
  37.  
  38. [root@orcl ~]# cp /etc/authmysqlrc.dist /etc/authmysqlrc  
  39. [root@orcl ~]# grep -v '^#' /etc/authmysqlrc |grep -v '^$'  
  40. MYSQL_SERVER             127.0.0.1  
  41. MYSQL_USERNAME           extmail  
  42. MYSQL_PASSWORD           123456  
  43. MYSQL_SOCKET             /tmp/mysql.sock  
  44. MYSQL_PORT               3306  
  45. MYSQL_OPT                0  
  46. MYSQL_DATABASE           extmail  
  47. MYSQL_USER_TABLE         mailbox  
  48. MYSQL_CRYPT_PWFIELD      password  
  49. MYSQL_UID_FIELD          1001  
  50. MYSQL_GID_FIELD          1001  
  51. MYSQL_LOGIN_FIELD        username  
  52. MYSQL_HOME_FIELD         concat('/email/mailbox/',homedir)    
  53. MYSQL_NAME_FIELD         name  
  54. MYSQL_MAILDIR_FIELD      concat('/email/mailbox/',maildir)  
  55.  
  56. 3:启动authlib服务  
  57. [root@orcl ~]# /usr/local/courier-authlib/sbin/authdaemond start  
  58. [root@orcl ~]# ps -ef |grep courier  
  59. root     31874     1  0 11:35 ?        00:00:00 /usr/local/courier-authlib/sbin/courierlogger -pid=/usr/local/courier-authlib/var/spool/authdaemon/pid -start /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  60. root     31875 31874  0 11:35 ?        00:00:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  61. root     31876 31875  0 11:35 ?        00:00:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  62. root     31877 31875  0 11:35 ?        00:00:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  63. root     31878 31875  0 11:35 ?        00:00:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  64. root     31879 31875  0 11:35 ?        00:00:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  65. root     31880 31875  0 11:35 ?        00:00:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond  
  66.  
  67. [root@orcl ~]# echo '/usr/local/courier-authlib/sbin/authdaemond start' > /etc/rc.local  

二:安装 cyrus-sasl,SASL (Simple Authentication Security Layer)简单认证安全层,功能主要是用于SMTP认证;而 Cyrus SASL是SASL的一个实现

  1. 1:卸载系统自带的sasl rpm包,使用--nodeps选项强制卸载  
  2. [root@orcl ~]# rpm -qa |grep sasl  
  3. cyrus-sasl-2.1.22-5.el5  
  4. cyrus-sasl-devel-2.1.22-5.el5  
  5. cyrus-sasl-lib-2.1.22-5.el5  
  6. cyrus-sasl-plain-2.1.22-5.el5  
  7. [root@orcl ~]# rpm -e $(rpm -qa |grep cyrus-sasl) --nodeps  
  8. [root@orcl ~]# rpm -qa |grep sasl |wc -l  
  9. 0  
  10. [root@orcl ~]# cd /usr/local/src/tarbag/  
  11. [root@orcl tarbag]# wget ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.22.tar.gz  
  12. [root@orcl tarbag]# tar -zxvf cyrus-sasl-2.1.22.tar.gz -C ../software/  
  13. [root@orcl tarbag]# cd ../software/cyrus-sasl-2.1.22/  
  14. [root@orcl cyrus-sasl-2.1.22]# ./configure --prefix=/usr/local/sasl2 --with-mysql=/usr/local/mysql --disable-sample --disable-saslauthd --disable-pwcheck --disable-cram --disable-digest --disable-krb4 --disable-gssapi --disable-anon --enable-plain --enable-login --enable-sql --disable-ntlm --disable-otp --disable-srp --disable-srp-setpass --with-authdaemond=/usr/local/courier-authlib/var/spool/authdaemon/socket --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/mysql   
  15. [root@orcl cyrus-sasl-2.1.22]# make && make install  
  16. [root@orcl cyrus-sasl-2.1.22]# ls /usr/local/sasl2/  
  17. include  lib  man  sbin  
  18. [root@orcl cyrus-sasl-2.1.22]# rm -rf /usr/lib/sasl2/  
  19. [root@orcl cyrus-sasl-2.1.22]# ln -s /usr/local/sasl2/lib/sasl2/ /usr/lib  
  20. [root@orcl ~]# tail -2 /etc/ld.so.conf  
  21. /usr/local/sasl2/lib/sasl2    
  22. /usr/local/sasl2/lib   
  23. [root@orcl ~]# ldconfig   
  24.  
  25. 2:编辑smtpd认证配置文件,该文件默认不存在  
  26. [root@orcl ~]# cat /usr/local/sasl2/lib/sasl2/smtpd.conf     
  27. pwcheck_method: authdaemond    
  28. log_level: 3    
  29. mech_list: PLAIN LOGIN    
  30. authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket  
  31.  
  32. 3:创建相关目录并启动测试  
  33. [root@orcl ~]# mkdir -p /var/state/saslauthd  
  34. [root@orcl ~]# /usr/local/sasl2/sbin/saslauthd -a shadow pam -d  
  35. saslauthd[10252] :main            : num_procs  : 5  
  36. saslauthd[10252] :main            : mech_option: NULL  
  37. saslauthd[10252] :main            : run_path   : /var/state/saslauthd  
  38. saslauthd[10252] :main            : auth_mech  : shadow  
  39. saslauthd[10252] :ipc_init        : using accept lock file: /var/state/saslauthd/mux.accept  
  40. saslauthd[10252] :detach_tty      : master pid is: 0  
  41. saslauthd[10252] :ipc_init        : listening on socket: /var/state/saslauthd/mux  
  42. saslauthd[10252] :main            : using process model  
  43. saslauthd[10253] :get_accept_lock : acquired accept lock  
  44. saslauthd[10252] :have_baby       : forked child: 10253  
  45. saslauthd[10252] :have_baby       : forked child: 10254  
  46. saslauthd[10252] :have_baby       : forked child: 10255  
  47. saslauthd[10252] :have_baby       : forked child: 10256  
  48. saslauthd[10256] :server_exit     : child exited: 10256  
  49. saslauthd[10255] :server_exit     : child exited: 10255  
  50. saslauthd[10254] :server_exit     : child exited: 10254  
  51. saslauthd[10253] :server_exit     : child exited: 10253  
  52. saslauthd[10252] :handle_sigchld  : child exited: 10253  
  53. saslauthd[10252] :handle_sigchld  : child exited: 10254  
  54. saslauthd[10252] :handle_sigchld  : child exited: 10255  
  55. saslauthd[10252] :handle_sigchld  : child exited: 10256  
  56. 此处按"ctrl+C"  
  57. saslauthd[10252] :server_exit     : pid file lock removed: /var/state/saslauthd/saslauthd.pid.lock  
  58. saslauthd[10252] :ipc_cleanup     : accept lock file removed: /var/state/saslauthd/mux.accept  
  59. saslauthd[10252] :ipc_cleanup     : socket removed: /var/state/saslauthd/mux  
  60. saslauthd[10252] :server_exit     : master exited: 0  
  61.  
  62. [root@orcl ~]# /usr/local/sasl2/sbin/saslauthd -a shadow pam -d &  
  63. [1] 30341  
  64. [root@orcl ~]# exit  
  65. logout  
  66. [root@orcl ~]# ps -ef |grep sasl  
  67. root     30341     1  0 11:19 ?        00:00:00 /usr/local/sasl2/sbin/saslauthd -a shadow pam -d  
  68. root     30342 30341  0 11:19 ?        00:00:00 /usr/local/sasl2/sbin/saslauthd -a shadow pam -d  
  69. root     30343 30341  0 11:19 ?        00:00:00 /usr/local/sasl2/sbin/saslauthd -a shadow pam -d  
  70. root     30344 30341  0 11:19 ?        00:00:00 /usr/local/sasl2/sbin/saslauthd -a shadow pam -d  
  71. root     30345 30341  0 11:19 ?        00:00:00 /usr/local/sasl2/sbin/saslauthd -a shadow pam -d  
  72.  
  73. [root@orcl ~]# echo '/usr/local/sasl2/sbin/saslauthd -a shadow pam -d' >> /etc/rc.local  

三:安装BerkeleyDB

  1. 1:卸载系统自带的db4 rpm包,使用--nodeps选项强制卸载  
  2. [root@orcl ~]# rpm -qa |grep db4  
  3. db4-4.3.29-10.el5  
  4. db4-devel-4.3.29-10.el5  
  5. [root@orcl ~]# rpm -e $(rpm -qa |grep db4) --nodeps  
  6. [root@orcl ~]# rpm -qa |grep db4 |wc -l  
  7. 0  
  8. [root@orcl ~]# cd /usr/local/src/tarbag/  
  9. [root@orcl tarbag]# wget http://download.oracle.com/berkeley-db/db-4.8.26.tar.gz  
  10. [root@orcl tarbag]# tar -zxvf db-4.8.26.tar.gz -C ../software/  
  11. [root@orcl tarbag]# cd ../software/db-4.8.26/build_unix/  
  12. [root@orcl build_unix]# ../dist/configure --prefix=/usr/local/BerkeleyDB  
  13. [root@orcl build_unix]# make && make install  
  14. [root@orcl build_unix]# ls /usr/local/BerkeleyDB/  
  15. bin  docs  include  lib  
  16. [root@orcl ~]# ln -s /usr/local/BerkeleyDB/include  /usr/include/db4  
  17. [root@orcl ~]# ln -s /usr/local/BerkeleyDB/include/db.h /usr/include/  
  18. [root@orcl ~]# ln -s /usr/local/BerkeleyDB/include/db_cxx.h /usr/include/  
  19. [root@orcl ~]# echo '/usr/local/BerkeleyDB/lib' >> /etc/ld.so.conf    
  20. [root@orcl ~]# ldconfig 

四:安装postfix

  1. 1:关闭sendmail  
  2. [root@orcl ~]# service sendmail stop  
  3. Shutting down sm-client: [  OK  ]  
  4. Shutting down sendmail: [  OK  ]  
  5. [root@orcl ~]# chkconfig sendmail off  
  6.  
  7. 2:下载postfix源码包并编译安装  
  8. [root@orcl ~]# echo '/usr/local/mysql/lib/mysql/' >> /etc/ld.so.conf  
  9. [root@orcl ~]# ldconfig  
  10. [root@orcl ~]# cd /usr/local/src/tarbag/  
  11. [root@orcl tarbag]# wget ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/official/postfix-2.8.0.tar.gz  
  12. [root@orcl tarbag]# wget http://vda.sourceforge.net/VDA/postfix-vda-2.8.0.patch  //支持磁盘配额的补丁  
  13. [root@orcl tarbag]# tar -zxvf postfix-2.8.0.tar.gz -C ../software/  
  14. [root@orcl tarbag]# mv postfix-vda-2.8.0.patch ../software/postfix-2.8.0/  
  15. [root@orcl tarbag]# cd ../software/postfix-2.8.0/  
  16. [root@orcl postfix-2.8.0]# make clean  
  17. [root@orcl postfix-2.8.0]# make tidy  
  18. [root@orcl postfix-2.8.0]# patch -p1 < postfix-vda-2.8.0.patch   
  19. patching file README_FILES/VDA_README  
  20. patching file src/global/mail_params.h  
  21. patching file src/util/file_limit.c  
  22. patching file src/virtual/mailbox.c  
  23. patching file src/virtual/maildir.c  
  24. patching file src/virtual/virtual.c  
  25. patching file src/virtual/virtual.h  
  26.  
  27. [root@orcl postfix-2.8.0]# make -f Makefile.init Makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/sasl2/include/sasl' 'AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm -L/usr/local/sasl2/lib   -lsasl2 -L/usr/local/BerkeleyDB/lib'    
  28.  
  29. [root@orcl postfix-2.8.0]# make && make install  
  30. Please specify the prefix for installed file names. Specify this ONLY  
  31. if you are building ready-to-install packages for distribution to other  
  32. machines.  
  33. install_root: [/]   
  34.  
  35. Please specify a directory for scratch files while installing Postfix. You  
  36. must have write permission in this directory.  
  37. tempdir: [/usr/local/src/software/postfix-2.8.0]   
  38.  
  39. Please specify the final destination directory for installed Postfix  
  40. configuration files.  
  41. config_directory: [/etc/postfix] /usr/local/postfix/etc  
  42.  
  43. Please specify the final destination directory for installed Postfix  
  44. administrative commands. This directory should be in the command search  
  45. path of adminstrative users.  
  46. command_directory: [/usr/sbin] /usr/local/postfix/sbin  
  47.  
  48. Please specify the final destination directory for installed Postfix  
  49. daemon programs. This directory should not be in the command search path  
  50. of any users.  
  51. daemon_directory: [/usr/libexec/postfix] /usr/local/postfix/libexec  
  52.  
  53. Please specify the final destination directory for Postfix-writable  
  54. data files such as caches or random numbers. This directory should not  
  55. be shared with non-Postfix software.  
  56. data_directory: [/var/lib/postfix] /usr/local/postfix/var/lib           
  57.  
  58. Please specify the destination directory for the Postfix HTML  
  59. files. Specify "no" if you do not want to install these files.  
  60. html_directory: [no]   
  61.  
  62. Please specify the owner of the Postfix queue. Specify an account with  
  63. numerical user ID and group ID values that are not used by any other  
  64. accounts on the system.  
  65. mail_owner: [postfix]   
  66.  
  67. Please specify the final destination pathname for the installed Postfix  
  68. mailq command. This is the Sendmail-compatible mail queue listing command.  
  69. mailq_path: [/usr/bin/mailq]   
  70.  
  71. Please specify the destination directory for the Postfix on-line manual  
  72. pages. You can no longer specify "no" here.  
  73. manpage_directory: [/usr/local/man] /usr/local/postfix/man  
  74.  
  75. Please specify the final destination pathname for the installed Postfix  
  76. newaliases command. This is the Sendmail-compatible command to build  
  77. alias databases for the Postfix local delivery agent.  
  78. newaliases_path: [/usr/bin/newaliases]   
  79.  
  80. Please specify the final destination directory for Postfix queues.  
  81. queue_directory: [/var/spool/postfix] /usr/local/postfix/var/spool  
  82.  
  83. Please specify the destination directory for the Postfix README  
  84. files. Specify "no" if you do not want to install these files.  
  85. readme_directory: [no]   
  86.  
  87. Please specify the final destination pathname for the installed Postfix  
  88. sendmail command. This is the Sendmail-compatible mail posting interface.  
  89. sendmail_path: [/usr/sbin/sendmail]   
  90.  
  91. Please specify the group for mail submission and for queue management  
  92. commands. Specify a group name with a numerical group ID that is  
  93. not shared with other accounts, not even with the Postfix mail_owner  
  94. account. You can no longer specify "no" here.  
  95. setgid_group: [postdrop]  
  96.  
  97. 编译最后报错如下,找不到/etc/postfix/main.cf,后面通过软链接解决,这里直接无视!  
  98. postfix: fatal: open /etc/postfix/main.cf: No such file or directory  
  99. make: *** [install] Error 1  
  100.  
  101. 3:验证postfix是否支持sasl和mysql  
  102. [root@orcl postfix-2.8.0]# ls /usr/local/postfix/  
  103. etc  libexec  man  sbin  var  
  104. [root@orcl postfix-2.8.0]# ls /usr/local/postfix/etc/  
  105. access             canonical      LICENSE          makedefs.out  TLS_LICENSE  
  106. aliases            generic        main.cf          master.cf     transport  
  107. bounce.cf.default  header_checks  main.cf.default  relocated     virtual  
  108.  
  109. [root@orcl ~]# mv /etc/aliases /tmp/aliases.old  
  110. [root@orcl ~]# ln -s /usr/local/postfix/etc/aliases /etc/  
  111. [root@orcl ~]# /usr/bin/newaliases  
  112. newaliases: fatal: open /etc/postfix/main.cf: No such file or directory  
  113. [root@orcl ~]# ln -s /usr/local/postfix/etc/main.cf /etc/po  
  114. [root@orcl ~]# mkdir /etc/postfix  
  115. [root@orcl ~]# ln -s /usr/local/postfix/etc/main.cf /etc/postfix/  
  116. [root@orcl ~]# /usr/bin/newaliases  
  117.  
  118. [root@orcl ~]# /usr/local/postfix/sbin/postconf -a  
  119. cyrus  
  120. dovecot  
  121. [root@orcl ~]# /usr/local/postfix/sbin/postconf -m |grep mysql  
  122. mysql  
  123.  
  124. 4.配置并启动postfix  
  125. [root@orcl ~]# cp /usr/local/postfix/etc/main.cf /usr/local/postfix/etc/main.cf.orig  
  126. [root@orcl ~]# cat /etc/postfix/main.cf   
  127. ##====================MAIN========================  
  128. myhostname = mail.yang.com    
  129. mydomain = yang.com    
  130. myorigin = $mydomain    
  131. mydestination =    
  132. inet_interfaces = all  
  133. mynetworks = 192.168.227.0/24,192.168.123.0/24,127.0.0.0/8  
  134. alias_maps =        hash:/etc/aliases     
  135. alias_database =        hash:/etc/aliases     
  136. queue_directory =   /usr/local/postfix/var/spool   
  137. command_directory = /usr/local/postfix/sbin    
  138. daemon_directory =  /usr/local/postfix/libexec    
  139. sendmail_path =     /usr/sbin/sendmail    
  140. newaliases_path =   /usr/bin/newaliases    
  141. mailq_path =        /usr/bin/mailq    
  142. setgid_group =      postdrop    
  143. html_directory =    no    
  144. manpage_directory = /usr/local/postfix/man    
  145. sample_directory =  /usr/local/postfix/etc/    
  146. readme_directory =  no    
  147. unknown_local_recipient_reject_code = 550 
  148.  
  149. ##====================SASL========================      
  150. broken_sasl_auth_clients = yes    
  151. smtpd_recipient_restrictions =  permit_mynetworks,    
  152.  permit_sasl_authenticated,    
  153.  reject_invalid_hostname,    
  154.  reject_non_fqdn_hostname,    
  155.  reject_unknown_sender_domain,    
  156.  reject_non_fqdn_sender,    
  157.  reject_non_fqdn_recipient,    
  158.  reject_unknown_recipient_domain,    
  159.  reject_unauth_pipelining,    
  160.  reject_unauth_destination,    
  161.  permit    
  162. smtpd_sasl_auth_enable = yes    
  163. smtpd_sasl_local_domain = $myhostname    
  164. smtpd_sasl_security_options = noanonymous    
  165. smtpdsmtpd_sasl_application_name = smtpd    
  166. smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)    
  167.  
  168. ##================ Virtual Mailbox Settings =====================#    
  169. virtual_mailbox_base = /email/mailbox    
  170. virtual_mailbox_maps = mysql:/usr/local/postfix/etc/mysql_virtual_mailbox_maps.cf    
  171. virtual_mailbox_domains = mysql:/usr/local/postfix/etc/mysql_virtual_domains_maps.cf    
  172. virtual_alias_domains = virtual_alias_maps = mysql:/usr/local/postfix/etc/mysql_virtual_alias_maps.cf    
  173. virtual_uid_maps = static:1001    
  174. virtual_gid_maps = static:1001    
  175. virtual_transport = maildrop    
  176. maildrop_destination_recipient_limit = 1    
  177. maildrop_destination_concurrency_limit = 1    
  178. message_size_limit = 14336000    
  179. virtual_mailbox_limit = 20971520    
  180. virtual_create_maildirsize = yes    
  181. virtual_mailbox_extended = yes    
  182. virtual_mailbox_limit_maps = mysql:/usr/local/postfix/etc/mysql_virtual_mailbox_limit_maps.cf    
  183. virtual_mailbox_limit_override = yes    
  184. virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please Tidy your mailbox and try again later.    
  185. virtual_overquota_bounce = yes    
  186.  
  187. [root@orcl ~]# cat /usr/local/postfix/etc/mysql_virtual_domains_maps.cf   
  188. user = extmail    
  189. password = 123456 
  190. hosts = localhost    
  191. dbname = extmail    
  192. table = domain    
  193. select_field = description    
  194. where_field = domain    
  195. additional_conditions = AND active = '1'    
  196.  
  197. [root@orcl ~]# cat /usr/local/postfix/etc/mysql_virtual_mailbox_maps.cf   
  198. user = extmail    
  199. password = 123456    
  200. hosts = localhost    
  201. dbname = extmail    
  202. table = mailbox    
  203. select_field = maildir    
  204. where_field = username    
  205. additional_conditions = AND active = '1' 
  206.  
  207. [root@orcl ~]# cat /usr/local/postfix/etc/mysql_virtual_alias_maps.cf   
  208. user = extmail    
  209. password =  123456    
  210. hosts = localhost    
  211. dbname = extmail    
  212. table = alias    
  213. select_field = goto    
  214. where_field = address    
  215. additional_conditions = AND active = '1'    
  216.  
  217. [root@orcl ~]# cat /usr/local/postfix/etc/mysql_virtual_limit_maps.cf   
  218. user = extmail    
  219. password =  123456    
  220. hosts = localhost    
  221. dbname = extmail    
  222. table = mailbox    
  223. select_field = quota    
  224. where_field = username    
  225. additional_conditions = AND active = '1'   
  226.  
  227. [root@orcl ~]# /usr/local/postfix/sbin/postfix  start  
  228. postfix/postfix-script: fatal: no /etc/postfix/master.cf file found  
  229. postfix/postfix-script: fatal: Postfix integrity check failed!  
  230. [root@orcl ~]# ll /etc/postfix/main.cf   
  231. [root@orcl ~]# ln -s /usr/local/postfix/etc/master.cf /etc/postfix/  
  232. [root@orcl ~]# /usr/local/postfix/sbin/postfix  start  
  233. postfix/postfix-script: starting the Postfix mail system  
  234. [root@orcl ~]# netstat -ntpl |grep :25  
  235. tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      22089/master   

五.安装Courier-IMAP

  1. [root@orcl ~]# cd /usr/local/src/tarbag/  
  2. [root@orcl tarbag]# wget http://sourceforge.net/projects/courier/files/imap/4.9.3/courier-imap-4.9.3.tar.bz2/download    
  3. [root@orcl tarbag]# tar -jxvf courier-imap-4.9.3.tar.bz2 -C ../software/  
  4. [root@orcl tarbag]# cd ../software/courier-imap-4.9.3/  
  5. [root@orcl courier-imap-4.9.3]# ./configure --prefix=/usr/local/courier-imap --with-redhat --enable-unicode --disable-root-check --with-trashquota --without-ipv6 CPPFLAGS='-I/usr/local/courier-authlib/include' COURIERAUTHCONFIG='/usr/local/courier-authlib/bin/courierauthconfig'    
  6. [root@orcl courier-imap-4.9.3]# make && make install  
  7. [root@orcl courier-imap-4.9.3]# cd /usr/local/courier-imap/etc  
  8. [root@orcl etc]# cp imapd.dist  imapd  
  9. [root@orcl etc]# cp pop3d.dist pop3d  
  10. [root@orcl etc]# cp imapd-ssl.dist  imapd-ssl  
  11. [root@orcl etc]# cp pop3d-ssl.dist pop3d-ssl  
  12.  
  13. [root@orcl etc]# egrep -i 'path|start' pop3d |grep -v '^#'  
  14. POP3DSTART=YES 
  15. MAILDIRPATH=/opt/mailbox  
  16. [root@orcl etc]# egrep -i 'path|start' imapd |grep -v '^#'  
  17. IMAPDSTART=YES 
  18. MAILDIRPATH=/opt/mailbox  
  19.  
  20. [root@orcl etc]# cp /usr/local/src/software/courier-imap-4.9.3/courier-imap.sysvinit /etc/init.d/imapd  
  21. [root@orcl etc]# chmod +x /etc/init.d/imapd   
  22. [root@orcl etc]# chkconfig --add imapd  
  23. [root@orcl etc]# service imapd start  
  24. Starting Courier-IMAP server: imap pop3  
  25. [root@orcl etc]# netstat -ntpl |egrep '110|143'  
  26. tcp        0      0 0.0.0.0:110                 0.0.0.0:*                   LISTEN      14416/couriertcpd     
  27. tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN      14410/couriertcpd  

六: 安装maildrop

  1. [root@orcl etc]# cd /usr/local/src/tarbag/  
  2. [root@orcl tarbag]# wget http://nchc.dl.sourceforge.net/project/courier/maildrop/2.5.4/maildrop-2.5.4.tar.bz2  
  3. [root@orcl tarbag]# yum -y install pcre-devel  
  4. [root@orcl tarbag]# tar -jxvf maildrop-2.5.4.tar.bz2 -C ../software/  
  5. [root@orcl tarbag]# cd ../software/maildrop-2.5.4  
  6. [root@orcl maildrop-2.5.4]# ./configure --enable-sendmail=/usr/sbin/sendmail  --enable-trusted-users='root vmail' --enable-syslog=1 --enable-maildirquota  --enable-maildrop-uid=1001  --enable-maildrop-gid=1001 --with-trashquota --with-dirsync   
  7. [root@orcl maildrop-2.5.4]# make && make install  
  8. [root@orcl maildrop-2.5.4]# maildrop -v  
  9. maildrop 2.5.4 Copyright 1998-2005 Double Precision, Inc.  
  10. GDBM/DB extensions enabled.  
  11. Maildir quota extension are now always enabled.  
  12. This program is distributed under the terms of the GNU General Public  
  13. License. See COPYING for additional information.  
  14.  
  15. [root@orcl maildrop-2.5.4]# cat /etc/maildroprc  //该文件默认不存在  
  16. logfile "/var/log/maildrop.log"   
  17. [root@orcl maildrop-2.5.4]# touch /var/log/maildrop.log  
  18. [root@orcl maildrop-2.5.4]# chown vmail.vmail /var/log/maildrop.log   
  19.  
  20. 配置postfix支持maildrop  
  21. [root@orcl ~]# grep -2 -i 'maildrop' /etc/postfix/master.cf  |grep -v '^#'  
  22. maildrop  unix  -       n       n       -       -       pipe  
  23.   flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}  
  24.     
  25. [root@orcl ~]# egrep '1001|maildrop' /etc/postfix/main.cf  
  26. virtual_transport = maildrop    
  27. virtual_uid_maps = static:1001   
  28. virtual_gid_maps = static:1001 

七:配置extman和extmail等

  1. 1:配置extman  
  2. [root@orcl ~]# mkdir -p /email/mailbox  
  3. [root@orcl ~]# chown -R vmail.vmail /email/mailbox/  
  4. [root@orcl ~]# chown -R vmail.vmail /email/mailbox/    
  5. [root@orcl tarbag]# tar -zxvf extman-1.1.tar.gz -C ../software/  
  6. [root@orcl tarbag]# mv ../software/extman-1.1/ /www/extman  
  7. [root@orcl tarbag]# mv /www/extman/webman.cf.default /opt/extman/webman.cf  
  8. [root@orcl ~]# grep -v '^#' /www/extman/webman.cf  |grep -v '^$'  
  9. SYS_CONFIG = /www/extman/  
  10. SYS_LANGDIR = /www/extman/lang  
  11. SYS_TEMPLDIR = /www/extman/html  
  12. SYS_MAILDIR_BASE = /email/mailbox  
  13. SYS_SHOW_WARN = 0 
  14. SYS_SESS_DIR = /tmp/extman/  
  15. SYS_APP_TYPE = ExtMan 
  16. SYS_TEMPLATE_NAME = default 
  17. SYS_DEFAULT_EXPIRE = 1y 
  18. SYS_GROUPMAIL_SENDER = postmaster@extmail.org  
  19. SYS_DEFAULT_SERVICES = webmail,smtpd,smtp,pop3,netdisk  
  20. SYS_BACKEND_TYPE = mysql 
  21. SYS_CRYPT_TYPE = md5crypt 
  22. SYS_MYSQL_USER = extmail 
  23. SYS_MYSQL_PASS = 123456 
  24. SYS_MYSQL_DB =   extmail 
  25. SYS_MYSQL_HOST = localhost 
  26. SYS_MYSQL_SOCKET = /tmp/mysql.sock  
  27. SYS_MYSQL_TABLE = manager 
  28. SYS_MYSQL_ATTR_USERNAME = username 
  29. SYS_MYSQL_ATTR_PASSWD = password 
  30. SYS_LDAP_BASE = dc=extmail.org  
  31. SYS_LDAP_RDN = cn=Manager,dc=extmail.org  
  32. SYS_LDAP_PASS = secret 
  33. SYS_LDAP_HOST = localhost 
  34. SYS_LDAP_ATTR_USERNAME = mail 
  35. SYS_LDAP_ATTR_PASSWD = userPassword 
  36.  
  37. [root@orcl tarbag]# mkdir /tmp/extman  
  38. [root@orcl tarbag]# chown vmail.vmail /www/extman/  
  39. [root@orcl tarbag]# chown vmail.vmail /tmp/extman/  
  40.  
  41. 2:配置extmail  
  42. [root@orcl tarbag]# tar -zxvf extmail-1.2.tar.gz -C /www/  
  43. [root@orcl tarbag]# mv /www/extmail-1.2/ /www/extmail  
  44. [root@orcl ~]# cp /www/extmail/webmail.cf.default /www/extmail/webmail.cf  
  45. [root@orcl ~]# grep -v '^#' /www/extmail/webmail.cf |grep -v '^$'  
  46. SYS_CONFIG = /www/extmail/  
  47. SYS_LANGDIR = /www/extmail/lang  
  48. SYS_TEMPLDIR = /www/extmail/html  
  49. SYS_HTTP_CACHE = 0 
  50. SYS_SMTP_HOST = 127.0.0.1  
  51. SYS_SMTP_PORT = 25 
  52. SYS_LOG_FILE = /var/log/extmail.log  
  53. SYS_SESS_TIMEOUT = 0 
  54. SYS_SESS_COOKIE_ONLY = 1 
  55. SYS_USER_PSIZE = 10 
  56. SYS_USER_SCREEN = auto 
  57. SYS_USER_LANG = en_US 
  58. SYS_APP_TYPE = WebMail 
  59. SYS_USER_TEMPLATE = default 
  60. SYS_USER_CHARSET = utf-8  
  61. SYS_AUTH_TYPE = mysql 
  62. SYS_MAILDIR_BASE = /email/mailbox  
  63. SYS_AUTH_SCHEMA = virtual 
  64. SYS_CRYPT_TYPE = md5crypt 
  65. SYS_MYSQL_USER = extmail 
  66. SYS_MYSQL_PASS = 123456 
  67. SYS_MYSQL_DB = extmail 
  68. SYS_MYSQL_HOST = localhost 
  69. SYS_MYSQL_SOCKET = /tmp/mysql.sock  
  70. SYS_MYSQL_TABLE = mailbox 
  71. SYS_MYSQL_ATTR_USERNAME = username 
  72. SYS_MYSQL_ATTR_DOMAIN = domain 
  73. SYS_MYSQL_ATTR_PASSWD = password 
  74. SYS_MYSQL_ATTR_CLEARPW = clearpwd 
  75. [root@orcl ~]# chown -R vmail.vmail /www/extmail/  
  76.  
  77. 3:导入数据库文件:  
  78. [root@orcl ~]# cd /www/extman/docs/  
  79. [root@orcl docs]# /usr/local/mysql/bin/mysql -u root -p < extmail.sql   
  80. Enter password:   
  81. [root@orcl docs]# /usr/local/mysql/bin/mysql -u root -p < init.sql   
  82. Enter password:   
  83.  
  84. root@orcl docs]# /usr/local/mysql/bin/mysql   
  85. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  86. Your MySQL connection id is 4  
  87. Server version: 5.1.36-log Source distribution  
  88. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  89.  
  90. mysql> show databases;  
  91. +--------------------+  
  92. | Database           |  
  93. +--------------------+  
  94. | information_schema |   
  95. | aclocal            |   
  96. | extmail            |   
  97. | mysql              |   
  98. | test               |   
  99. +--------------------+  
  100. 5 rows in set (0.04 sec)  
  101.  
  102. mysql> use extmail;  
  103. Database changed  
  104. mysql> show tables;  
  105. +-------------------+  
  106. | Tables_in_extmail |  
  107. +-------------------+  
  108. | alias             |   
  109. | domain            |   
  110. | domain_manager    |   
  111. | mailbox           |   
  112. | manager           |   
  113. +-------------------+  
  114. 5 rows in set (0.01 sec)  
  115.  
  116. mysql> grant all privileges on extmail.* to extmail@'localhost' identified by '123456';  
  117. Query OK, 0 rows affected (0.00 sec)  
  118.  
  119. mysql> flush privileges;  
  120. Query OK, 0 rows affected (0.00 sec)  
  121.  
  122. 4:配置slockd  
  123. [root@orcl ~]# cd /usr/local/src/tarbag/  
  124. [root@orcl tarbag]# tar -zxvf slockd-0.99.tar.gz -C /usr/local/  
  125. [root@orcl tarbag]# /usr/local/slockd/slockd-init start  
  126. Starting spam locker daemon: slockd  
  127. [root@orcl tarbag]# echo '/usr/local/slockd/slockd-init start' >> /etc/rc.local   
  128. [root@orcl tarbag]# cd /var/run/  
  129. [root@orcl run]# mkdir extmail  
  130. [root@orcl run]# /www/extman/daemon/cmdserver -v -d  
  131. loaded ok  
  132. [root@orcl run]# echo '/www/extman/daemon/cmdserver -v -d' >> /etc/rc.local  

 八:配置apache

  1. [root@orcl ~]# grep 'vmail' /usr/local/apache2.2.16/conf/httpd.conf  
  2. User  vmail   
  3. Group vmail  
  4.  
  5. <VirtualHost *:80>     
  6.          ServerName   mail.yang.com     
  7.          DocumentRoot /www/extmail/html         
  8.          ScriptAlias  /extmail/cgi     /www/extmail/cgi    
  9.          Alias        /extmail         /www/extmail/html   
  10.          ScriptAlias  /extman/cgi      /www/extman/cgi   
  11.          Alias        /extman          /www/extman/html          
  12.         <Directory /www>         
  13.          Authtype basic     
  14.          Options execcgi     
  15.          Options Indexes FollowSymLinks     
  16.          AllowOverride None     
  17.          Order allow,deny     
  18.          Allow from all     
  19.         </Directory>     
  20. </VirtualHost> 
  21. [root@orcl ~]# /usr/local/apache2.2.16/bin/apachectl -t  
  22. Syntax OK  
  23. [root@orcl ~]# /usr/local/apache2.2.16/bin/apachectl -k restart 

九:测试和排错, extman默认管理帐号为:root@extmail.org   密码为:extmail*123*

  1. 1:安装GD,若未安装,则会出现验证码无法正常显示  
  2. [root@orcl ~]# cd /usr/local/src/tarbag/  
  3. [root@orcl tarbag]# tar -zxvf GD-2.35.tar.gz -C ../software/  
  4. [root@orcl tarbag]# cd ../software/GD-2.35/  
  5. [root@orcl GD-2.35]# perl Makefile.PL  
  6. [root@orcl GD-2.35]# make && make install  

2:出现下图中的情况,需要重新安装前面卸载掉的db4和db4-devel 
[root@orcl ~]# yum -y install db4 db4-devel

3:出现下图中的情况,需要安装UNix-syslog

 

  1. [root@orcl ~]# cd /usr/local/src/tarbag/  
  2. [root@orcl tarbag]# gzip -d Unix-Syslog-1.1.tar.gz   
  3. [root@orcl tarbag]# tar -xvf Unix-Syslog-1.1.tar -C ../software/  
  4. [root@orcl tarbag]# cd ../software/Unix-Syslog-1.1/  
  5. [root@orcl Unix-Syslog-1.1]# ls  
  6. Artistic  Changes  Makefile.PL  MANIFEST  META.yml  README  Syslog.pm  Syslog.xs  test.pl  
  7. [root@orcl Unix-Syslog-1.1]# perl Makefile.PL   
  8. Checking if your kit is complete...  
  9. Looks good  
  10. Writing Makefile for Unix::Syslog  
  11. [root@orcl Unix-Syslog-1.1]# make && make install 

4:新建邮件域,登陆出错

 

 

 

安装perl-DBD-MySQL后重新登陆
[root@orcl ~]# yum -y install perl-DBD-MySQL

 5: 发信测试

 

 

  1. [root@orcl ~]# tail -f /var/log/maillog  
  2. Sep  5 16:05:31 orcl extmail[12523]: user=<admin@yang.com>client=192.168.227.1, module=loginstatus=loginok 
  3. Sep  5 16:06:29 orcl postfix/smtpd[12555]: connect from localhost.localdomain[127.0.0.1]  
  4. Sep  5 16:06:29 orcl postfix/smtpd[12555]: B842123EFB4: client=localhost.localdomain[127.0.0.1]  
  5. Sep  5 16:06:29 orcl postfix/cleanup[12560]: B842123EFB4: message-id=<20110905080629.B842123EFB4@mail.yang.com> 
  6. Sep  5 16:06:29 orcl postfix/smtpd[12555]: disconnect from localhost.localdomain[127.0.0.1]  
  7. Sep  5 16:06:29 orcl postfix/qmgr[12286]: B842123EFB4: from=<admin@yang.com>size=615nrcpt=1 (queue active)  
  8. Sep  5 16:06:31 orcl postfix/smtp[12561]: B842123EFB4: to=<ylw6006@163.com>relay=163mx03.mxmail.netease.com[123.125.50.140]:25, delay=2.2, delays=0.07/0/1.2/0.94, dsn=2.0.0, status=sent (250 Mail OK queued as mx47,XcCowGBps0bRgmROKP+GAw--.907S2 1315209938)  
  9. Sep  5 16:06:32 orcl postfix/qmgr[12286]: B842123EFB4: removed 

6:extman日志分析

 

  1. [root@orcl ~]# cd /usr/local/src/tarbag/  
  2. [root@orcl tarbag]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz  
  3. [root@orcl tarbag]# tar -zxvf rrdtool-1.4.5.tar.gz -C ../software/  
  4. [root@orcl tarbag]# cd ../software/rrdtool-1.4.5/  
  5. [root@orcl rrdtool-1.4.5]# ./configure --prefix=/usr/local/rrdtool  
  6. [root@orcl rrdtool-1.4.5]# make && make install  
  7.  
  8. [root@orcl ~]# ln -s /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDs/RRDs.so /usr/lib/perl5/5.8.8/i386-linux-thread-multi/  
  9. [root@orcl ~]# ln -s /usr/local/rrdtool/lib/perl/5.8.8/RRDp.pm /usr/lib/perl5/5.8.8/  
  10. [root@orcl ~]# ln -s /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/RRDs.pm /usr/lib/perl5/5.8.8/  
  11. [root@orcl ~]# cp -r /www/extman/addon/mailgraph_ext/ /usr/local/  
  12.  
  13. [root@orcl ~]# /usr/local/mailgraph_ext/mailgraph-init start  
  14. Starting mail statistics grapher: mailgraph_ext  
  15. Can't locate File/Tail.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/mailgraph_ext/mailgraph_ext.pl line 296.  
  16. BEGIN failed--compilation aborted at /usr/local/mailgraph_ext/mailgraph_ext.pl line 296.  
  17. Starting queue statistics grapher: qmonitor  
  18.  
  19. [root@orcl ~]# cpan  
  20. cpan> install File::Tail  
  21. cpan>quit   
  22.  
  23. [root@orcl ~]# /usr/local/mailgraph_ext/mailgraph-init start  
  24. Starting mail statistics grapher: mailgraph_ext  
  25. Starting queue statistics grapher: qmonitor  
  26.  
  27. [root@orcl ~]# echo '/usr/local/mailgraph_ext/mailgraph-init start' >> /etc/rc.local 

 十:增加FCGI支持,主要是为了获得优异的web效能

1:安装mod_fastcgi模块

  1. [root@orcl ~]# cd /usr/local/src/tarbag/  
  2. [root@orcl tarbag]# wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz  
  3. [root@orcl tarbag]# tar -zxvf mod_fastcgi-2.4.6.tar.gz -C ../software/  
  4. [root@orcl tarbag]# cd ../software/mod_fastcgi-2.4.6/  
  5. [root@orcl mod_fastcgi-2.4.6]# cp Makefile.AP2 Makefile  
  6. [root@orcl mod_fastcgi-2.4.6]# make top_dir=/usr/local/apache2.2.16/ install  
  7. [root@orcl mod_fastcgi-2.4.6]# ls /usr/local/apache2.2.16/modules/mod_fastcgi.so   
  8. /usr/local/apache2.2.16/modules/mod_fastcgi.so 

2:安装perl-FCGI模块,使extmail支持fastcgi

  1. [root@orcl ~]# rpm -ivh http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el5/en/i386/RPMS.dries/perl-FCGI-0.67-1.2.el5.rf.i386.rpm //32位系统  
  2. [root@orcl ~]# rpm -ivh http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el5/en/x86_64/RPMS.dries/perl-FCGI-0.67-1.2.el5.rf.x86_64.rpm //64位系统 

3:配置apache,extmail支持fastcgi

  1. [root@orcl ~]# egrep 'fast|9000' /usr/local/apache2.2.16/conf/httpd.conf  
  2. LoadModule fastcgi_module        modules/mod_fastcgi.so  
  3. <Ifmodule mod_fastcgi.c> 
  4. FastCgiExternalServer /var/www/extsuite/extmail/dispatch.fcgi -host 127.0.0.1:8888  
  5. </Ifmodule> 
  6.  
  7. [root@orcl ~]# vi /usr/local/apache2.2.16/conf/extra/httpd-vhosts.conf  
  8. <VirtualHost *:80> 
  9.          ServerName   mail.yang.com     
  10.          DocumentRoot /www/extmail/html  
  11.          ScriptAlias  /extmail/cgi     /www/extmail/dispatch.fcgi  
  12.          Alias        /extmail         /www/extmail/html  
  13.          ScriptAlias  /extman/cgi      /www/extmail/dispatch.fcgi  
  14.          Alias        /extman          /www/extman/html  
  15.         <Location "/extman/cgi"> 
  16.          SetHandler fastcgi-script  
  17.         </Location> 
  18.         <Directory /www> 
  19.          Authtype basic  
  20.          Options execcgi  
  21.          Options Indexes FollowSymLinks  
  22.          AllowOverride None  
  23.          Order allow,deny  
  24.          Allow from all  
  25.         </Directory> 
  26. </VirtualHost> 
  27.  
  28. [root@orcl ~]# egrep 'vmail|www|9000' /www/extmail/dispatch-init   
  29. PORT=9000 
  30. SU_UID=vmail 
  31. SU_GID=vmail 
  32. BASE=/www/extmail 

 4:启动fastcgi server

  1. [root@orcl ~]# /www/extmail/dispatch-init  start  
  2. Starting extmail FCGI server...  
  3. [root@orcl ~]# ps -ef |grep dispatch  
  4. vmail    23661     1  0 09:43 ?        00:00:00 dispatch.fcgi (master)  
  5. vmail    23662 23661  0 09:43 ?        00:00:00 dispatch.fcgi (idle)  
  6. vmail    23663 23661  0 09:43 ?        00:00:00 dispatch.fcgi (idle)  
  7. root     23680 12093  0 09:43 pts/3    00:00:00 grep dispatch  
  8. [root@orcl ~]# netstat -ntpl |grep :9000  
  9. tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      23811/dispatch.fcgi   
  10. [root@orcl ~]# echo '/www/extmail/dispatch-init start' >> /etc/rc.local  

5:重启apache

  1. [root@orcl ~]# /usr/local/apache2.2.16/bin/apachectl -t  
  2. Syntax OK  
  3. [root@orcl ~]# /usr/local/apache2.2.16/bin/apachectl -k restart 

备注:本文的安装过程非常繁琐,需要用到的软件也很多,因而在本文中没有提供下载地址的软件将会统一打包放在附件中,后期会重点研究下垃圾邮件过滤和邮件病毒的查杀;另外,本文参考了胡双峰同学写的博文,在此深表感谢,双峰同学博客地址:http://blog.csdn.net/deccmtd/

 

转自:http://ylw6006.blog.51cto.com/470441/658208/

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics