Postfixadmin 2.1.0用的人比较多,笔者就给那些想用的、新手点笔记,是关于Postfixadmin 2.1.0安装的,请看下文。
建立apache和maildrop的用户和组
- # groupadd vmail -g 1001
- # useradd vmail -u 1001 -g 1001 -s/bin/false -d/dev/null
- # vi /usr/local/apache/conf/httpd.conf
把
User nobody
Group #-1
改为
User vmail
Group vmail
- # wget http://high5.net/postfixadmin/download.php?file=postfixadmin-2.1.0.tgz
- # tar -zxvf postfixadmin-2.1.0.tgz
- # mkdir /var/www
- # mv postfixadmin-2.1.0 /var/www/postfixadmin
更改权限,假定运行apache的用户和组为vmail
- # chown -R vmail:vmail /var/www/postfixadmin
- # cd /var/www/postfixadmin
- # chmod 640 *.php *.css
- # cd /var/www/postfixadmin/admin/
- # chmod 640 *.php .ht*
- # cd /var/www/postfixadmin/images/
- # chmod 640 *.gif *.png
- # cd /var/www/postfixadmin/languages/
- # chmod 640 *.lang
- # cd /var/www/postfixadmin/templates/
- # chmod 640 *.tpl
- # cd /var/www/postfixadmin/users/
- # chmod 640 *.php
#p#
建立mysql表
- # cd /var/www/postfixadmin
- # mysql -u root [-p] < DATABASE_MYSQL.TXT
- # cp config.inc.php.sample config.inc.php
- # vi config.inc.php
本例中的配置如下:
// Language config
// Language files are located in './languages'.
$CONF['default_language'] = 'cn';
// Database Config
// 'database_type' is for future reference.
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'postfixadmin';
$CONF['database_name'] = 'postfix';
//$CONF['encrypt'] = 'md5crypt';
$CONF['encrypt'] = 'cleartext';
// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF['domain_path'] = 'YES';
// If you don't want to have the domain in your mailbox set this to 'NO'.
// Example: /usr/local/virtual/domain.tld/username
$CONF['domain_in_mailbox'] = 'NO';
// Quota
// When you want to enforce quota for your mailbox users set this to 'YES'.
$CONF['quota'] = 'YES';
// You can either use '1024000' or '1048576'
$CONF['quota_multiplier'] = '1024000';
我们在这里使用明文口令方式,如果想使用密文,请把$CONF['encrypt']='cleartext';改成$CONF['encrypt']='md5crypt';
邮箱的存储格式使用domain.ltd/username的形式,所以设置:
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
然后打开浏览器,进入postfixadmin的欢迎界面,点击网页上的setup,看看检查是否通过,记得要删除setup.php文件。然后进入http://www.yourdomain.com/postfixadmin/admin/index.php,就可以新建域名、管理员以及邮箱了。
通过上面文章的学习,想必大家都知道如何安装Postfixadmin2.1.0了哇,希望对你们有用!
【编辑推荐】