这是本文档旧的修订版!


ExtMan是一个基于Web的邮件帐号管理系统。可以通过他来管理邮件帐号、管理员帐号和域名等,默认的超级用户是 root@extmail.org,密码是extmail*123* ExtMan还集成了mailgraph,可以ExtMan内看到整个邮件系统的相关状态流量图。使用ExtMan来管理您的邮件系统将使工作变得更加轻松。之前我们已经安装了ExtMan,在此直接配置webman.cf即可。

1、ExtMan的安装

由于在安装过程中要使用ExtMan里面带的文件,因此在此先安装ExtMan。安装时根据个人需要选择MySQL支持。

shell

# cd /usr/ports/mail/extman/ && make install clean

导入数据库
备注:
MYSQL5.5.x 版本不支持 TYPE=MyISAM 这样的语句

shell

# sed -i 's/TYPE=MyISAM/ENGINE=MyISAM/g' /usr/local/www/extman/docs/extmail.sql
# /usr/local/bin/mysql -u root -p < /usr/local/www/extman/docs/extmail.sql
# /usr/local/bin/mysql -u root -p < /usr/local/www/extman/docs/init.sql

设置虚拟域和虚拟用户的配置文件:

shell

# cp /usr/local/www/extman/docs/mysql_virtual_alias_maps.cf /usr/local/etc/postfix/
# cp /usr/local/www/extman/docs/mysql_virtual_domains_maps.cf /usr/local/etc/postfix/
# cp /usr/local/www/extman/docs/mysql_virtual_mailbox_maps.cf /usr/local/etc/postfix/
# vi /usr/local/etc/postfix/main.cf

增加以下内容:

virtual_alias_maps = $alias_maps, mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf

2、测试authlib

在命令行下执行:

shell

# /usr/local/sbin/authtest -s login postmaster@extmail.org extmail

结果如下:

Authentication succeeded.

     Authenticated: postmaster@extmail.org  (uid 1000, gid 1000)
    Home Directory: /home/domains/extmail.org/postmaster
           Maildir: /home/domains/extmail.org/postmaster/Maildir/
             Quota: 104857600S
Encrypted Password: $1$phz1mRrj$3ok6BjeaoJYWDBsEPZb5C0
Cleartext Password: extmail
           Options: (none)

这样表明ExtMan的正确安装,数据库也正确导入,courier-authlib能正确连接到mysql数据库

3、配置extman

编辑webman.cf文件:

shell

# chmod 644 /usr/local/www/extman/webman.cf
# vi /usr/local/www/extman/webman.cf

修改对应的参数如下:

SYS_CONFIG = /usr/local/www/extman/
SYS_LANGDIR = /usr/local/www/extman/lang
SYS_TEMPLDIR = /usr/local/www/extman/html
SYS_MAILDIR_BASE = /home/domains
SYS_SESS_DIR = /var/tmp/extman/
SYS_DEFAULT_MAXQUOTA = 10000
SYS_DEFAULT_MAXALIAS = 10000
SYS_BACKEND_TYPE = mysql
SYS_MYSQL_SOCKET = /tmp/mysql.sock

4、其他设置

执行如下命令

shell

# mkdir /var/lib
# mkdir /var/tmp/extman/
# chown -R vmail:vmail /var/tmp/extman/
# chmod 700 /var/tmp/extman/
# chmod 600 /usr/local/www/extman/webman.cf

5、配置图形日志

安装依赖软件

shell

# cd /usr/ports/databases/rrdtool && make install clean
# cd /usr/ports/devel/p5-File-Tail && make install clean
# cd /usr/ports/devel/p5-Time-HiRes && make install clean

安装mailgraph_ext

shell

# cp -ar /usr/local/www/extman/addon/mailgraph_ext /usr/local/
# /usr/local/mailgraph_ext/mailgraph-init start

启动cmdserver(在后台显示系统信息)

shell

# chmod +x /var/www/extsuite/daemon/cmdserver
# /var/www/extsuite/extman/daemon/cmdserver –daemon

加入开机自启动:

shell

# echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.local
# echo "/var/www/extsuite/extman/daemon/cmdserver -v -d" >> /etc/rc.local

使用方法: 等待大约15分钟左右,如果邮件系统有一定的流量,即可登陆到extman里,点“图形日志”即可看到图形化的日志。具体每天,周,月,年的则点击相应的图片进入即可。

 
十、配置extman.1373954235.txt.gz · 最后更改: 2013/07/16 13:57 由 shaobo
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki