标签:
---恢复内容开始---
#wget http://nchc.dl.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.92/postfixadmin-2.92.tar.gz //下载postfixadmin管理程序,放到web目录下
1 [root@mail html]# cd postfixadmin/ 2 #修改前先备份一下配置文件 3 [root@mail postfixadmin]# cp config.inc.php config.inc.php.bak 4 [root@mail postfixadmin]# cp setup.php setup.php.bak 5 [root@mail postfixadmin]# vim config.inc.php 6 #找到下面几行并修改 7 $CONF[‘configured‘] = true; 8 $CONF[‘database_type‘] = ‘mysql‘; 9 $CONF[‘database_host‘] = ‘localhost‘; 10 $CONF[‘database_user‘] = ‘postfix‘; 11 $CONF[‘database_password‘] = ‘postfix‘; 12 $CONF[‘database_name‘] = ‘postfix‘; 13 $CONF[‘admin_email‘] = ‘postmaster@free.com‘; 14 $CONF[‘encrypt‘] = ‘dovecot:CRAM-MD5‘; 15 $CONF[‘dovecotpw‘] = "/usr/bin/doveadm pw"; //先查找dovecot是否安装 ,再到相应目录查看文件是否存在 16 $CONF[‘domain_path‘] = ‘YES‘; 17 $CONF[‘domain_in_mailbox‘] = ‘NO‘; 18 $CONF[‘aliases‘] = ‘1000‘; 19 $CONF[‘mailboxes‘] = ‘1000‘; 20 $CONF[‘maxquota‘] = ‘1000‘; 21 $CONF[‘fetchmail‘] = ‘NO‘; 22 $CONF[‘quota‘] = ‘YES‘; 23 $CONF[‘used_quotas‘] = ‘YES‘; 24 $CONF[‘new_quota_table‘] = ‘YES‘;
为postfixadmin创建Mysql数据库与权限
1 [root@mail ~]# mysql -u root -p 2 mysql> create database postfix; 3 mysql> grant all on postfix.* to postfix@‘localhost‘ identified by ‘postfix‘; 4 mysql> flush privileges;
测试一下能不能登录,
1 [root@mail html]# mysql -upostfix -ppostfix 2 Welcome to the MySQL monitor. Commands end with ; or \g. 3 Your MySQL connection id is 3 4 Server version: 5.1.69 Source distribution 5 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 6 Oracle is a registered trademark of Oracle Corporation and/or its 7 affiliates. Other names may be trademarks of their respective 8 owners. 9 Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. 10 mysql> show databases; 11 +--------------------+ 12 | Database | 13 +--------------------+ 14 | information_schema | 15 | postfix | 16 | test | 17 +--------------------+ 18 3 rows in set (0.00 sec) 19 mysql> 20 测试成功可能登录!
修改所有者与所有组(如果没有vmail帐号,先创建)
1 [root@mail html]# chown -R vmail.vmail postfixadmin/ 2 [root@mail html]# ll 3 总用量 8 4 -rw-r--r-- 1 root root 18 7月 10 22:18 index.php 5 drwxrwxr-x 14 vmail vmail 4096 7月 10 22:57 postfixadmin 6 [root@mail html]#
具体配置过程如下图
(1).http://192.168.18.187/postfixadmin/setup.php
保证postfixadmin/templates_c 为可写 ,
安装php5-imap
在原始安装文件下编译imap.so
1 #cd /etc/imap 2 #phpize 3 #./configure --with-php-config=/server/php/bin/php-config --with-kerberos --with-imap-ssl 4 #make && make install 5 #vi /server/php/etc/php.ini 6 //插入 7 #extension=imap.so
---恢复内容结束---
标签:
原文地址:http://www.cnblogs.com/linuxOS/p/4703690.html