Postfixadmin 2.1.0安裝筆記
Postfixadmin 2.1.0用的人比較多,筆者就給那些想用的、新手點筆記,是關(guān)于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
更改權(quán)限,假定運行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的形式,所以設(shè)置:
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
然后打開瀏覽器,進(jìn)入postfixadmin的歡迎界面,點擊網(wǎng)頁上的setup,看看檢查是否通過,記得要刪除setup.php文件。然后進(jìn)入http://www.yourdomain.com/postfixadmin/admin/index.php,就可以新建域名、管理員以及郵箱了。
通過上面文章的學(xué)習(xí),想必大家都知道如何安裝Postfixadmin2.1.0了哇,希望對你們有用!
【編輯推薦】