Postfix
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*Postfix Configration Manual [#v06a069c]
*目次 [#i20b2b56]
#contents
**Postfixのインストール [#z004a3b2]
***Postfix用ユーザ・グループの作成 [#n84af90b]
Postfix用のユーザとグループを新規に作成します。
ユーザ名:postfix
グループ名:postdrop
groupadd -g 810 postdrop
useradd -u 811 -d /nonexistent -s /sbin/nologin postfix
postfixユーザのグループをpostdropにするとエラーが出ます。
ご注意!!
***ファイルの展開・コンパイル [#zf7ee7b8]
ファイルを展開しコンパイル
tar zxvf postfix-2.1.5.tar.gz
cd postfix-2.1.5
make
エラーなくコンパイルができたらインストール
make install
インストールの際に以下のことを聞かれる
Warning: if you use this script to install Postfix lo...
this script will replace existing sendmail or Postfix...
Make backups if you want to be able to recover.
Before installing files, this script prompts you for ...
Most definitions will be remembered, so you have to s...
only once. All definitions should have a reasonable d...
Please specify the prefix for installed file names. Spec...
if you are building ready-to-install packages for distri...
machines.
install_root: [/]
Please specify a directory for scratch files while insta...
must have write permission in this directory.
tempdir: [/usr/src/postfix-2.1.5] /usr/local/postfix
Please specify the final destination directory for insta...
configuration files.
config_directory: [/etc/postfix]
Please specify the final destination directory for insta...
daemon programs. This directory should not be in the com...
of any users.
daemon_directory: [/usr/libexec/postfix]
Please specify the final destination directory for insta...
administrative commands. This directory should be in the...
path of adminstrative users.
command_directory: [/usr/sbin]
Please specify the final destination directory for Postf...
queue_directory: [/var/spool/postfix]
Please specify the final destination pathname for the in...
sendmail command. This is the Sendmail-compatible mail p...
sendmail_path: [/usr/sbin/sendmail]
Please specify the final destination pathname for the in...
newaliases command. This is the Sendmail-compatible comm...
alias databases for the Postfix local delivery agent.
newaliases_path: [/usr/bin/newaliases]
Please specify the final destination pathname for the in...
mailq command. This is the Sendmail-compatible mail queu...
mailq_path: [/usr/bin/mailq]
Please specify the owner of the Postfix queue. Specify a...
numerical user ID and group ID values that are not used ...
accounts on the system.
mail_owner: [postfix]
Please specify the group for mail submission and for que...
commands. Specify a group name with a numerical group ID...
not shared with other accounts, not even with the Postfi...
account. You can no longer specify "no" here.
setgid_group: [postdrop]
Please specify the destination directory for the Postfix...
files. Specify "no" if you do not want to install these ...
html_directory: [no]
Please specify the destination directory for the Postfix...
pages. You can no longer specify "no" here.
manpage_directory: [/usr/local/man]
Please specify the destination directory for the Postfix...
files. Specify "no" if you do not want to install these ...
readme_directory: [no]
基本的にデフォルトのままでいいが、TMPディレクトリだけは別...
少なからず、私はインストールが完了した場合ソースの入った...
***main.cfの編集 [#a8e3a0ed]
main.cfを編集する。
その前にオリジナルファイルを必ずバックアップしておく。
main.cf.defaultというファイルがあったが、中を見るとmain.c...
解説部分がない上に、表示の順番が違うためわかりにくい。
ということで、main.cfをコピーして取っておく事をおすすめす...
cd /etc/postfix
cp main.cf main.cf.orig
いよいよmain.cfの編集へと続く
myhostname = hoge.jp
mydomain = hoge.jp
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localh...
mynetworks_style = subnet
mynetworks = 192.168.0.0/24, 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mail_spool_directory = /var/spool/mail
smtpd_banner = $myhostname ESMTP $mail_name
とりあえず、主として変更するところはこの辺だと思う。
設定終了後Posrfixを起動
/usr/sbin/postfix start
エラーが表示されたらmain.cfを再編集し、Postfixが起動する...
**SMTPAuthenticationの導入 [#r97d058b]
メール送信のためにPOP Before SMTPを使う人もいるが、送信時...
POP Before SMTPではNAT環境において自分のPC以外からリレー...
ということで、今回はSMTPAuthを導入。
***Postfixのリコンパイル [#ac0a3caf]
SMTPAuthをONにするためPostfixをリコンパイルする
make tidy
make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include" A...
make
***パスワードデータベースの指定 [#id02f4da]
sasldbを認証DBとして使うと指定
echo pwcheck_method:sasldb > /usr/lib/sasl/smtpd.conf
***パスワードの設定 [#q42e7047]
ユーザの追加・作成(2人目を作成する場合からは”-c”オプショ...
saslpasswd -c -u hoge.jp hoge
ユーザの削除
saslpasswd -d -u hoge.jp hoge
ユーザ一覧の表示
sasldblistusers
***データベースファイルの設定変更 [#f6208b8a]
Postfixがデータベースを扱えるようにグループとパーミッショ...
chgrp postfix /etc/sasldb
chmod 640 /etc/sasldb
***main.cfの再設定 [#r104023e]
main.cfの一番下に以下の設定を追加する。
#SASL configuration
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_...
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
その後Postfixを再起動する。
/usr/sbin/postfix reload
**SMTPAuth+TLSの導入 [#w44874ab]
意外と難しいことが判明
ちょっと持ち越しの可能性大
* 参考リンク [#e5a7cd55]
>> [[Postfix のぺーじ:http://www.kobitosan.net/postfix/]]
終了行:
*Postfix Configration Manual [#v06a069c]
*目次 [#i20b2b56]
#contents
**Postfixのインストール [#z004a3b2]
***Postfix用ユーザ・グループの作成 [#n84af90b]
Postfix用のユーザとグループを新規に作成します。
ユーザ名:postfix
グループ名:postdrop
groupadd -g 810 postdrop
useradd -u 811 -d /nonexistent -s /sbin/nologin postfix
postfixユーザのグループをpostdropにするとエラーが出ます。
ご注意!!
***ファイルの展開・コンパイル [#zf7ee7b8]
ファイルを展開しコンパイル
tar zxvf postfix-2.1.5.tar.gz
cd postfix-2.1.5
make
エラーなくコンパイルができたらインストール
make install
インストールの際に以下のことを聞かれる
Warning: if you use this script to install Postfix lo...
this script will replace existing sendmail or Postfix...
Make backups if you want to be able to recover.
Before installing files, this script prompts you for ...
Most definitions will be remembered, so you have to s...
only once. All definitions should have a reasonable d...
Please specify the prefix for installed file names. Spec...
if you are building ready-to-install packages for distri...
machines.
install_root: [/]
Please specify a directory for scratch files while insta...
must have write permission in this directory.
tempdir: [/usr/src/postfix-2.1.5] /usr/local/postfix
Please specify the final destination directory for insta...
configuration files.
config_directory: [/etc/postfix]
Please specify the final destination directory for insta...
daemon programs. This directory should not be in the com...
of any users.
daemon_directory: [/usr/libexec/postfix]
Please specify the final destination directory for insta...
administrative commands. This directory should be in the...
path of adminstrative users.
command_directory: [/usr/sbin]
Please specify the final destination directory for Postf...
queue_directory: [/var/spool/postfix]
Please specify the final destination pathname for the in...
sendmail command. This is the Sendmail-compatible mail p...
sendmail_path: [/usr/sbin/sendmail]
Please specify the final destination pathname for the in...
newaliases command. This is the Sendmail-compatible comm...
alias databases for the Postfix local delivery agent.
newaliases_path: [/usr/bin/newaliases]
Please specify the final destination pathname for the in...
mailq command. This is the Sendmail-compatible mail queu...
mailq_path: [/usr/bin/mailq]
Please specify the owner of the Postfix queue. Specify a...
numerical user ID and group ID values that are not used ...
accounts on the system.
mail_owner: [postfix]
Please specify the group for mail submission and for que...
commands. Specify a group name with a numerical group ID...
not shared with other accounts, not even with the Postfi...
account. You can no longer specify "no" here.
setgid_group: [postdrop]
Please specify the destination directory for the Postfix...
files. Specify "no" if you do not want to install these ...
html_directory: [no]
Please specify the destination directory for the Postfix...
pages. You can no longer specify "no" here.
manpage_directory: [/usr/local/man]
Please specify the destination directory for the Postfix...
files. Specify "no" if you do not want to install these ...
readme_directory: [no]
基本的にデフォルトのままでいいが、TMPディレクトリだけは別...
少なからず、私はインストールが完了した場合ソースの入った...
***main.cfの編集 [#a8e3a0ed]
main.cfを編集する。
その前にオリジナルファイルを必ずバックアップしておく。
main.cf.defaultというファイルがあったが、中を見るとmain.c...
解説部分がない上に、表示の順番が違うためわかりにくい。
ということで、main.cfをコピーして取っておく事をおすすめす...
cd /etc/postfix
cp main.cf main.cf.orig
いよいよmain.cfの編集へと続く
myhostname = hoge.jp
mydomain = hoge.jp
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localh...
mynetworks_style = subnet
mynetworks = 192.168.0.0/24, 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mail_spool_directory = /var/spool/mail
smtpd_banner = $myhostname ESMTP $mail_name
とりあえず、主として変更するところはこの辺だと思う。
設定終了後Posrfixを起動
/usr/sbin/postfix start
エラーが表示されたらmain.cfを再編集し、Postfixが起動する...
**SMTPAuthenticationの導入 [#r97d058b]
メール送信のためにPOP Before SMTPを使う人もいるが、送信時...
POP Before SMTPではNAT環境において自分のPC以外からリレー...
ということで、今回はSMTPAuthを導入。
***Postfixのリコンパイル [#ac0a3caf]
SMTPAuthをONにするためPostfixをリコンパイルする
make tidy
make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include" A...
make
***パスワードデータベースの指定 [#id02f4da]
sasldbを認証DBとして使うと指定
echo pwcheck_method:sasldb > /usr/lib/sasl/smtpd.conf
***パスワードの設定 [#q42e7047]
ユーザの追加・作成(2人目を作成する場合からは”-c”オプショ...
saslpasswd -c -u hoge.jp hoge
ユーザの削除
saslpasswd -d -u hoge.jp hoge
ユーザ一覧の表示
sasldblistusers
***データベースファイルの設定変更 [#f6208b8a]
Postfixがデータベースを扱えるようにグループとパーミッショ...
chgrp postfix /etc/sasldb
chmod 640 /etc/sasldb
***main.cfの再設定 [#r104023e]
main.cfの一番下に以下の設定を追加する。
#SASL configuration
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_...
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
その後Postfixを再起動する。
/usr/sbin/postfix reload
**SMTPAuth+TLSの導入 [#w44874ab]
意外と難しいことが判明
ちょっと持ち越しの可能性大
* 参考リンク [#e5a7cd55]
>> [[Postfix のぺーじ:http://www.kobitosan.net/postfix/]]
ページ名: