Postfixadmin

Table of Contents

Postfix+Dovecot+MySQL+Postfixadminで仮想サーバ対応のメールサーバを構築
インストールの前提条件は、PostfixDovecotMySQLApachePHPがインストール済み

gitからダウンロード

# cd /opt/
# git clone https://github.com/postfixadmin/postfixadmin.git
# cd postfixadmin
# git checkout postfixadmin-3.2.4

postfixadminのバージョン確認

gitのコマンドでpostfixadminの使用可能バージョンを確認

# cd /opt/postfixadmin
# git tag

ApacheにAlias設定追加

# vi /etc/httpd/conf.d/postfixadmin.conf
-----------------------------------------------
Alias /postfixadmin/ "/opt/postfixadmin/public/"

<Directory "/opt/postfixadmin/public">
  Require all denied
  Require ip 192.168.xxx.
</Directory>
-----------------------------------------------

データベースの作成

# mysql -u root -p
mysql>   CREATE DATABASE postfixdb;
mysql>   CREATE USER 'postfix'@'localhost' IDENTIFIED BY '(パスワード)';
mysql>   GRANT ALL PRIVILEGES ON `postfixdb` . * TO 'postfix'@'localhost';
mysql>   FLUSH PRIVILEGES;

localの設定ファイル作成

データベースの接続設定ファイル作成

# vi /opt/postfixadmin/config.local.php
---------------------------------------------------------------
<?php
$CONF['database_type'] = 'mysqli';
$CONF['database_user'] = 'postfix';
$CONF['database_password'] = '(パスワード)';
$CONF['database_name'] = 'postfixdb';
$CONF['configured'] = true;
?>
---------------------------------------------------------------

tempフォルダ作成

# mkdir -p /opt/postfixadmin/templates_c
# chown -R apache /opt/postfixadmin/templates_c

セットアップURL

http://www.chinaz.org/postfixadmin/setup.php

localの設定ファイル変更

セットアップパスワードや、必要な設定を追記

# vi /opt/postfixadmin/config.local.php
---------------------------------------------------------------
$CONF['setup_password'] = '8662c7f68cd264f0a4d6cd48af2a2249e:42c7f68cda768bf77ca86580299971bececd711';
$CONF['password_validation'] = array(
#    '/regular expression/' => '$PALANG key (optional: + parameter)',
    '/.{5}/'                => 'password_too_short 5',      # minimum length 5 characters
    '/([a-zA-Z].*){3}/'     => 'password_no_characters 3',  # must contain at least 3 characters
#    '/([0-9].*){2}/'        => 'password_no_digits 2',      # must contain at least 2 digits
);
$CONF['footer_text'] = 'Return to chinaz.org';
$CONF['footer_link'] = 'http://www.chinaz.org';
---------------------------------------------------------------

登録処理

http://www.chinaz.org/postfixadmin/

  • 管理者アカウント作成
  • 仮想ユーザのアカウント作成
  • root宛て等のメールの転送設定作成

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です