- 论坛徽章:
- 0
|
http://www.extmail.org/forum/read.php?tid=563&fpage=&toread=1&page=1
1.安装Courier authentication library
vi /usr/local/etc/authlib/authmysqlrc
MYSQL_SERVER localhost
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE extmail
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
MYSQL_USER_TABLE mailbox
MYSQL_LOGIN_FIELD username
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '1001'
MYSQL_GID_FIELD '1001'
#MYSQL_HOME_FIELD '/var/mailbox/'
MYSQL_HOME_FIELD concat('/var/mailbox',homedir)
#MYSQL_MAILDIR_FIELD maildir
MYSQL_MAILDIR_FIELD concat('/var/mailbox',maildir)
MYSQL_NAME_FIELD name
MYSQL_QUOTA_FIELD concat(quota,'S')
MYSQL_WHERE_CLAUSE active='1'
DEFAULT_DOMAIN weblendar.com
2. 安装Extmail
从下面的URL下载extmail-0.22的安装文件:
http://www.extmail.org/cgi-bin/download.cgi
安装Extmail所需要的perl模块,安装的方法同上面的一样:
wget
http://search.cpan.org/CPAN/authors/id/K/KA/KASPER/HTML-KTemplate-1.33.tar.gz
安装Extmail:
tar zxvf extmail-0.22.tar.gz
mv extmail-0.22 /usr/local/httpd/htdocs/extmail
cd /var/www/extmail
chown -R vmail.vmail cgi
配置Extmail,因为Extmail的Config.pm模块还不是很完善,在参数的后边一定不要有多余的空格:
cp webmail.cf.default webmail.cf
vi webmail.cf
# sys_config, the config file and webmail programe root
SYS_CONFIG = /var/www/extmail/
# sys_langdir, the i18n dir
SYS_LANGDIR = /var/www/extmail/lang
# sys_templdir, the template dir
SYS_TEMPLDIR = /var/www/extmail/html
SYS_AUTH_SCHEMA = virtual
# crypt_type, the encrypt type of password, possible type currently
# is crypt|clear|md5|sha
SYS_CRYPT_TYPE = crypt
# if mysql, all relate paramters should prefix as SYS_MYSQL
# maildir_base, the base dir of user maildir, use absolute path
# if not set.
SYS_MAILDIR_BASE = /var/mailbox
# sys_auth_schema, vpopmail1/vpopmail2/virtual
# vpopmail1 => all user accounts in one table
# vpopmail2 => accounts in per domain table
SYS_AUTH_SCHEMA = virtual
# crypt_type, the encrypt type of password, possible type currently
# is crypt|clear|md5|sha
SYS_CRYPT_TYPE = crypt
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /tmp/mysql.sock
# table name
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = weblendar.com
SYS_MYSQL_ATTR_PASSWD = password
SYS_MYSQL_ATTR_QUOTA = quota
SYS_MYSQL_ATTR_NDQUOTA = netdiskquota
SYS_MYSQL_ATTR_HOME = homedir
SYS_MYSQL_ATTR_MAILDIR = maildir
配置Apache:
vi /usr/local/apache/conf/httpd.conf
AddHandler cgi-script .cgi
NameVirtualHost *:80
ServerAdmin webmaster@weblendar.com
#DocumentRoot /var/www/extmail/html
Alias /extmail/cgi/ /var/www/extmail/cgi/
Alias /extmail/ /var/www/extmail/html/
Alias /extman/cgi/ /var/www/extman/cgi/
Alias /extman/ /var/www/extman/html/
#ScriptAlias /extmail/cgi/ /var/www/cgi-bin/extmail/cgi/
#SuexecUserGroup postfix postfix
#ServerName mail.weblendar.com
ErrorLog logs/mail.weblendar.com-error_log
CustomLog logs/mail.weblendar.com-access_log common
Options +ExecCGI
Options +ExecCGI
3.安装Extman
从下面的URL下载extman 0.12:
http://www.extmail.org/cgi-bin/download.cgi
mkdir /tmp/extman
chown vmail.vmail /tmp/extman
使用extman源码目录下docs目录中的extmail.sql和init.sql建立数据库:
chown -R vmail.vmail /var/www/extman/cgi/
cd /var/www/extman/docs
mysql -u root -p
chown vmail.vmail /var/mailbox
修改Postfix的配置文件,#号之后是说明文字:
vi /etc/postfix/main.cf
myhostname = mail.example.com # mail.example.com是安装Postfix软件的主机名
mydomain = example.com # example.com是安装Postfix软件的主机名中的域名部分
myorigin = $mydomain
mydestination =
alias_maps = hash:/etc/aliases
home_mailbox = Maildir/ # 使用Maildir作为邮件的存储格式
# Add following line in file's finality
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /home/mail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 102400000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7869/showart_153793.html |
|