一、安装Extmail
1、安装
- tar zxvf extmail-1.2.tar.gz && \
-
mv extmail-1.2 /var/www/extsuite/extmail && \
-
cd /var/www/extsuite/extmail/ && \
-
cp webmail.cf.default webmail.cf
2、修改主配置文件
#vi /var/www/extsuite/extmail/webmail.cf
# sys_config, the config file and webmail programe root
SYS_CONFIG = /var/www/extsuite/extmail/
SYS_LANGDIR = /var/www/extsuite/extmail/lang
SYS_TEMPLDIR = /var/www/extsuite/extmail/html
SYS_HTTP_CACHE = 0
SYS_SMTP_HOST = 127.0.0.1
SYS_SMTP_PORT = 25
SYS_SMTP_TIMEOUT = 5
SYS_SPAM_REPORT_ON = 0
SYS_SPAM_REPORT_TYPE = dspam
SYS_SHOW_WARN = 0
SYS_IP_SECURITY_ON = 1
SYS_PERMIT_NOQUOTA = 1
SYS_SESS_DIR = /tmp
SYS_UPLOAD_TMPDIR = /tmp
SYS_LOG_ON = 1
SYS_LOG_TYPE = syslog
SYS_LOG_FILE = /var/log/extmail.log
SYS_SESS_TIMEOUT = 0
SYS_SESS_COOKIE_ONLY = 1
SYS_USER_PSIZE = 10
SYS_USER_SCREEN = auto
#把SYS_USER_LANG = en_US#语言选项,可改作:
SYS_USER_LANG = zh_CN
SYS_APP_TYPE = WebMail
SYS_USER_TEMPLATE = default
SYS_USER_CHARSET = utf-8
SYS_USER_TRYLOCAL = 1
SYS_USER_TIMEZONE = +0800
SYS_USER_CCSENT = 1
SYS_USER_SHOW_HTML = 1
SYS_USER_COMPOSE_HTML = 1
SYS_USER_CONV_LINK =1
SYS_USER_ADDR2ABOOK = 1
#用户可以发送的最大邮件,可不用改
SYS_MESSAGE_SIZE_LIMIT = 5242880
SYS_MIN_PASS_LEN = 2
SYS_MFILTER_ON = 1
SYS_NETDISK_ON = 1
SYS_SHOW_SIGNUP = 1
SYS_DEBUG_ON = 1
SYS_AUTH_TYPE = mysql
#把SYS_MAILDIR_BASE = /home/domains#此处即为您在前文所设置的用户邮件的存放目录,可改作:
SYS_MAILDIR_BASE = /var/mailbox
SYS_AUTH_SCHEMA = virtual
SYS_CRYPT_TYPE = md5crypt
#把SYS_MYSQL_USER = db_user
#把SYS_MYSQL_PASS = db_pass
#以上两句句用来设置连接数据库服务器所使用用户名、密码和邮件服务器用到的数据库,这里修改为:
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
#把SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
#连接数据库的sock文件位置,这里修改为:
SYS_MYSQL_SOCKET = /tmp/mysql.sock
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
SYS_MYSQL_ATTR_CLEARPW = clearpwd
SYS_MYSQL_ATTR_QUOTA = quota
SYS_MYSQL_ATTR_NDQUOTA = netdiskquota
SYS_MYSQL_ATTR_HOME = homedir
SYS_MYSQL_ATTR_MAILDIR = maildir
SYS_MYSQL_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_MYSQL_ATTR_DISABLENETDISK = disablenetdisk
SYS_MYSQL_ATTR_DISABLEPWDCHANGE = disablepwdchange
SYS_MYSQL_ATTR_ACTIVE = active
SYS_MYSQL_ATTR_PWD_QUESTION = question
SYS_MYSQL_ATTR_PWD_ANSWER = answer
SYS_LDAP_BASE = o=extmailAccount,dc=example.com
SYS_LDAP_RDN = cn=Manager,dc=example.com
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_DOMAIN = virtualDomain
SYS_LDAP_ATTR_PASSWD = userPassword
SYS_LDAP_ATTR_CLEARPW = clearPassword
SYS_LDAP_ATTR_QUOTA = mailQuota
SYS_LDAP_ATTR_NDQUOTA = netdiskQuota
SYS_LDAP_ATTR_HOME = homeDirectory
SYS_LDAP_ATTR_MAILDIR = mailMessageStore
SYS_LDAP_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_LDAP_ATTR_DISABLENETDISK = disablenetdisk
SYS_LDAP_ATTR_DISABLEPWDCHANGE = disablePasswdChange
SYS_LDAP_ATTR_ACTIVE = active
SYS_LDAP_ATTR_PWD_QUESTION = question
SYS_LDAP_ATTR_PWD_ANSWER = answer
#以上用来指定验正用户登录里所用到的表,以及用户名、域名和用户密码分别对应的表中列的名称;
#把SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket
#此句用来指明authdaemo socket文件的位置,这里修改为:
SYS_AUTHLIB_SOCKET = /usr/local/authlib/var/spool/authdaemon/socket
SYS_G_ABOOK_TYPE = file
SYS_G_ABOOK_LDAP_HOST = localhost
SYS_G_ABOOK_LDAP_BASE = ou=AddressBook,dc=example.com
SYS_G_ABOOK_LDAP_ROOTDN = cn=Manager,dc=example.com
SYS_G_ABOOK_LDAP_ROOTPW = secret
SYS_G_ABOOK_LDAP_FILTER = objectClass=OfficePerson
SYS_G_ABOOK_FILE_PATH = /var/www/extsuite/extmail/globabook.cf
SYS_G_ABOOK_FILE_LOCK = 1
SYS_G_ABOOK_FILE_CONVERT = 0
SYS_G_ABOOK_FILE_CHARSET = utf-8
3、 依赖关系的解决
extmail将会用到perl的DBD::Mysql和Unix::syslogd功能,您可以去搜索下载原码包进行安装。
#tar zxvf Unix-Syslog-1.1.tar.gz
#cd Unix-Syslog-1.1
#perl Makefile.PL
#make
#make install
#vi /etc/profile
export PATH=$PATH:/usr/local/mysql/bin:/usr/local/clamav/sbin:/usr/local/clamav/bin
#source /etc/profile
#安装DBD-mysql 需要perl-DBI-的支持
#tar zxvf DBD-mysql-4.019.tar.gz
#cd DBD-mysql-4.019
#perl Makefile.PL --libs="-L/usr/local/mysql/lib -lmysqlclient
-L/usr/lib -lz " --cflags=-I/usr/local/mysql/include
--mysql_config=/usr/local/mysql/bin/mysql_config
#make
#make install
二、安装Extman
1 、安装配置
- tar zxvf extman-1.1.1.tar.gz && \
-
mv extman-1.1.1 /var/www/extsuite/extman && \
-
cd /var/www/extsuite/extman/ && \
-
cp webman.cf.default webman.cf && \
vi /var/www/extsuite/extman/webman.cf
SYS_CONFIG = /var/www/extsuite/extman/
SYS_LANGDIR = /var/www/extsuite/extman/lang
SYS_TEMPLDIR = /var/www/extsuite/extman/html
#SYS_MAILDIR_BASE = /home/domains
#此处即为您在前文所设置的用户邮件的存放目录,可改作:
SYS_MAILDIR_BASE = /var/mailbox
SYS_SHOW_WARN = 0
SYS_SESS_DIR = /var/tmp/extman/
#SYS_CAPTCHA_ON = 0 (关闭显示校验码或者安装perl-GD模块)
#可以安装perl-GD-2.44-1.el5.rf.i386.rpm 支持校验
SYS_CAPTCHA_ON = 0
SYS_CAPTCHA_KEY = r3s9b6a7
SYS_CAPTCHA_LEN = 6
SYS_PURGE_DATA = 0
SYS_PSIZE = 20
SYS_APP_TYPE = ExtMan
SYS_TEMPLATE_NAME = default
SYS_DEFAULT_EXPIRE = 1y
SYS_GROUPMAIL_SENDER = postmaster@extmail.org
SYS_DEFAULT_SERVICES = webmail,smtpd,smtp,pop3,netdisk
SYS_ISP_MODE = no
SYS_DOMAIN_HASHDIR = yes
SYS_DOMAIN_HASHDIR_DEPTH = 2x2
SYS_USER_HASHDIR = yes
SYS_USER_HASHDIR_DEPTH = 2x2
SYS_MIN_UID = 500
SYS_MIN_GID = 100
SYS_DEFAULT_UID = 1000
SYS_DEFAULT_GID = 1000
SYS_QUOTA_MULTIPLIER = 1048576
SYS_QUOTA_TYPE = courier
SYS_DEFAULT_MAXQUOTA = 500
SYS_DEFAULT_MAXALIAS = 100
SYS_DEFAULT_MAXUSERS = 100
SYS_DEFAULT_MAXNDQUOTA = 500
SYS_USER_DEFAULT_QUOTA = 5
SYS_USER_DEFAULT_NDQUOTA = 5
SYS_USER_DEFAULT_EXPIRE = 1y
SYS_BACKEND_TYPE = mysql
SYS_CRYPT_TYPE = md5crypt
SYS_MYSQL_USER = webman
SYS_MYSQL_PASS = webman
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
#SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
#此处修改为:
SYS_MYSQL_SOCKET = /tmp/mysql.sock
SYS_MYSQL_TABLE = manager
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_PASSWD = password
SYS_LDAP_BASE = dc=extmail.org
SYS_LDAP_RDN = cn=Manager,dc=extmail.org
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_PASSWD = userPassword
SYS_RRD_DATADIR = /var/lib
SYS_RRD_TMPDIR = /tmp/viewlog
SYS_RRD_QUEUE_ON = yes
SYS_CMDSERVER_SOCK = /tmp/cmdserver.sock
SYS_CMDSERVER_MAXCONN = 5
SYS_CMDSERVER_PID = /var/run/cmdserver.pid
SYS_CMDSERVER_LOG = /var/log/cmdserver.log
SYS_CMDSERVER_AUTHCODE = your_auth_code_here
SYS_IGNORE_SERVER_LIST = web
2、建立数据用户
#使用extman源码目录下docs目录中的extmail.sql和init.sql建立数据库
#cd /var/www/extsuite/extman/docs
#mysql -u root -p #mysql -u root -p
#修改cgi目录的属主:
chown -R vmail.vmail /var/www/extsuite/extman/cgi/
#如果extman访问数据库权限不足的话,可采用以下命令将新生成的数据库赋予webman用户具有所有权限:
mysql> GRANT all privileges on extmail.* TO webman@localhost IDENTIFIED BY 'webman';
mysql> GRANT all privileges on extmail.* TO webman@127.0.0.1 IDENTIFIED BY 'webman';
mysql> GRANT all privileges on extmail.* TO extmail@127.0.0.1 IDENTIFIED BY 'extmail';
mysql> flush privileges;
3 、添加虚拟主机的支持
#在apache的主配置文件中Extmail的虚拟主机部分,配置详见apache配置文件。
#创建其运行时所需的临时目录,并修改其相应的权限:
mkdir -pv /var/tmp/extman
chown vmail.vmail /var/tmp/extman
mkdir /var/mailbox
chown -R vmail:vmail /var/mailbox/
#重新启动apache服务器后,您的Extman已经可以使用了,可以在浏览器中输入指定的虚拟主机的名称进行访问,如下:
选择管理即可登入extman 进行后台管理了。默认ap管理帐号为: root@extmail.org 密码为:extmail*123*
4、为extman配置图形监控支持
配置Mailgraph_ext
注意:安装以下软件之前,请确保你的系统已经安装了tcl、tcl-devel、libart和libart-devel的相关的软件包.
需要安装3个包:Time::HiRes、File::Tail和rrdtool
#echo "install Time::HiRes File::Tail "|perl -MCPAN -e shell
安装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
#创建必要的符号链接(Extman 会到这些路径下找相关的库文件)
- ln -s /usr/local/rrdtool/bin/* /usr/local/bin/
-
ln -sv /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/
-
ln -sv /usr/local/rrdtool/lib/perl/5.8.8/RRDp.pm /usr/lib/perl5/5.8.8
-
ln -sv /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/RRDs.pm /usr/lib/perl5/5.8.8
-
make site-perl-install
#复制mailgraph_ext 到/usr/local,并启动之
#cp -r /var/www/extsuite/extman/addon/mailgraph_ext /usr/local
#/usr/local/mailgraph_ext/mailgraph-init start
#添加到自动启动队列
#echo "/usr/local/mailgraph_ext/mailgraph-init start" >>/etc/rc.local
进入到extman后台, 显示 "系统信息 No such file or directory" :
解决:
#/var/www/extsuite/extman/daemon/cmdserver --daemon
loaded ok
阅读(3109) | 评论(0) | 转发(0) |