本文共 4388 字,大约阅读时间需要 14 分钟。
一、
二、
三、
四、 :
五、 :
六、:
七、 :
八、:
九、:
# mkdir /var/tmp/{extman,extmail} //创建session目录# chown vuser:vgroup /var/tmp/extma*# mkdir -p /var/maildata/domains/extmail.org/postmaster/Maildir //创建邮件存储目录# chown -R vuser:vgroup /var/maildata/# mkdir -p /var/www/extsuite/{extmail,extman} //创建extmail和extman网页文件目录
安装extmail:
# tar zxvf extmail-1.2.tar.gz# cp -rp extmail-1.2/* /var/www/extsuite/extmail/# chmod -R 755 /var/www/extsuite/# cd /var/www/extsuite/extmail/# cp webmail.cf.default webmail.cf# vi webmail.cfSYS_SESS_DIR = /var/tmp/extmail/SYS_MAILDIR_BASE = /var/maildata/domains/SYS_USER_LANG = en_USSYS_MYSQL_USER = extmailSYS_MYSQL_PASS = extmailSYS_MYSQL_DB = extmailSYS_MYSQL_HOST = localhostSYS_MYSQL_DB = extmailSYS_MYSQL_TABLE = mailboxSYS_MYSQL_ATTR_USERNAME = usernameSYS_MYSQL_ATTR_DOMAIN = domainSYS_MYSQL_ATTR_PASSWD = passwordSYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket
安装extman:
# tar zxvf extman-1.1.tar.gz# cp -rp extman-1.1/* /var/www/extsuite/extman/# chown -R vuser:vgroup /var/www/extsuite/# cd /var/www/extsuite/extman/# cp webman.cf.default webman.cf# vi webman.cfSYS_CAPTCHA_ON = 0SYS_MAILDIR_BASE = /var/maildata/domains/SYS_SESS_DIR = /var/tmp/extman/
导入数据库:
# mysql -u root -p < /var/www/extsuite/extman/docs/extmail.sql# mysql -u root -p < /var/www/extsuite/extman/docs/init.sql
生成extmail系统管理员的用户目录:
# cd /var/www/extsuite/extman/tools/# ./maildirmake.pl /var/maildata/domains/extmail.org/postmaster/Maildir/# chown -R vuser:vgroup /var/maildata/domains/# cp -r /var/www/extsuite/extman/docs/mysql_virtual_* /etc/postfix/# grep password /etc/postfix/mysql_virtual_*mysql_virtual_alias_maps.cf:password = extmailmysql_virtual_domains_maps.cf:password = extmailmysql_virtual_limit_maps.cf:password = extmailmysql_virtual_mailbox_maps.cf:password = extmailmysql_virtual_sender_maps.cf:password = extmail
配置postfix支持虚拟域和虚拟用户:
# vi /etc/postfix/main.cf##================ Virtual Mailbox Settings =====================#virtual_mailbox_base = /var/maildata/domainsvirtual_mailbox_maps =mysql:/etc/postfix/mysql_virtual_mailbox_maps.cfvirtual_mailbox_domains =mysql:/etc/postfix/mysql_virtual_domains_maps.cfvirtual_alias_domains =virtual_alias_maps =mysql:/etc/postfix/mysql_virtual_alias_maps.cfvirtual_uid_maps = static:1000virtual_gid_maps = static:1000virtual_transport = virtualmaildrop_destination_recipient_limit = 1maildrop_destination_concurrency_limit = 1
配置httpd虚拟主机:
# vi /etc/httpd/conf/httpd.confNameVirtualHost *:80Include conf/vhost_*.conf# vi /etc/httpd/conf/vhost_extmail.conf# VirtualHost for ExtMail Solution# VirtualHost for ExtMail SolutionServerName rhel5.vnimos.org DocumentRoot /var/www/extsuite/extmail/html/ ScriptAlias /extmail/cgi/ /var/www/extsuite/extmail/cgi/ Alias /extmail /var/www/extsuite/extmail/html/ ScriptAlias /extman/cgi/ /var/www/extsuite/extman/cgi/ Alias /extman /var/www/extsuite/extman/html/# Suexec config SuexecUserGroup vuser vgroup # chkconfig httpd on# /etc/init.d/httpd start
配置图形化日志 Mailgraph_ext:
安装Time::HiRes#tar zxvf Time-HiRes-1.9725.tar.gz#cd Time-HiRes-1.9725#perl Makefile.PL#make#make test#make install 安装 File::Tail#tar zxvf File-Tail-0.99.3.tar.gz#cd File-Tail-0.99.3#perl Makefile#make#make test#make install 安装 rrdtool-1.4.5#tar zxvf rrdtool-1.4.5.tar.gz#cd rrdtool-1.4.5#./configure --prefix=/usr/local/rrdtool#make#make install# cp -rp /var/www/extsuite/extman/addon/mailgraph_ext /usr/local/# ln -s /usr/local/rrdtool/lib/perl/5.8.8/x86_64-linux-thread-multi/auto/RRDs/RRDs.so /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/# ln -s /usr/local/rrdtool/lib/perl/5.8.8/RRDp.pm /usr/lib/perl5/5.8.8/# ln -s /usr/local/rrdtool/lib/perl/5.8.8/x86_64-linux-thread-multi/RRDs.pm /usr/lib/perl5/5.8.8/# /usr/local/mailgraph_ext/mailgraph-init start# /var/www/extsuite/extman/daemon/cmdserver --daemon# echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.d/rc.local# echo "/var/www/extsuite/extman/daemon/cmdserver -v-d" >> /etc/rc.d/rc.local添加定时任务:# crontab -e0 4 * * * /var/www/extsuite/extman/tools/expireusers.pl -all postmaster@extmail.org30 4 * * * /var/www/extsuite/extman/tools/reportusage.pl -all /home/domains postmaster@extmail.org
转载地址:http://kemna.baihongyu.com/