メールサーバー設定 1 (Postfixadmin)

| | Comments (0) | TrackBacks (0)
まずメールユーザのアカウントの設定をWebで簡単に行えるように postfixadmin をインストールします。
UbuntuのRepositoryには入っていないので、

http://sourceforge.net/projects/postfixadmin/
から現時点で最新版のpostfixadmin2.2.1.1all.debをダウンロードしてインストール。


dpkg -i postfixadmin_2.2.1.1_all.deb

上記コマンドを実行するとPostfixadminは"/usr/share/postfixadmin/ "にインストールされます。
設定ファイルは"/etc/postfixadmin/config.inc.php"です。
またApacheにaliasが追加されます → /etc/apache2/conf.d/postfixadmin

続いてPostfixadminの設定ファイルを編集します。

vim config.inc.php
[...]
$CONF['configured'] = true;
$CONF['postfix_admin_url'] = 'http://example.com/postfixadmin'; 

$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'YourPassword'; //Change here
$CONF['database_name'] = 'postfix';

$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['encrypt'] = 'cleartext';


設定ファイルの中に記載されているドメインを自分のものと置き換えます。

cd /usr/share/postfixadmin
sed -i "s/\@change-this-to-your.domain.tld/\@example.com/g" config.inc.php
sed -i "s/change-this-to-your.domain.tld/example.com/g" config.inc.php
sed -i "s/Return to example.com/Return to www.example.com/g" config.inc.php

Postfix用のデータベースとユーザーを作成します。


mysql -u root -p
mysql> create database postfix;
mysql> grant all privileges on postfix.* to 'postfixadmin'@'localhost'
                        identified by 'YourPassword!';
mysql> flush privileges;
mysql> \q

ブラウザを開いてhttp://yourdomain.com/postfixadmin/setup.phpへ移動します。
SetUpCheckerが全ての項目に対してOKと表示するか確認。
場合によってはphp5-imapなどをapt-getでインストールする。
OKならAdmin用のEmailAddressとパスワードを登録。 登録し終わったらsetup.phpは削除。
続いてhttp://yourdomain.com/postfixadmin/へと移動。 先程setup.phpで作成したAdminアカウントでログインできるか確かめておく。 (注...まだドメインやメールボックスは作成できません)

次回はPostfix本体の設定を暇なときに書きます。

0 TrackBacks

Listed below are links to blogs that reference this entry: メールサーバー設定 1 (Postfixadmin).

TrackBack URL for this entry: http://us.ms-square.com/cgi/mt/mt-tb.cgi/62

Leave a comment


画像の中に見える文字を入力してください。

About this Entry

This page contains a single entry by Manabu published on September 21, 2008 8:39 PM.

OpenSSH Server 設定メモ 2 was the previous entry in this blog.

サーバー稼働中! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.