絖綛 N@i.jp  昨日:00037963
 今日:00025091
 総計:00063054
keywords
管理者専用
  Post   Add link   Control Panel 































新しいトピック
最新:07/03 19:28


新しいコメント
最新:07/28 16:47






管理人へMAIL

プライバシーポリシー

MacOS-Xをメールサーバにする(その5)

ちゃんとメール送受信できるか動作確認します。


 まずターミナルか X window の xterm, kterm を起動します。しばらくUNIXの世界になります。
1) ポート25(smtp)の状態を確認
 netstatコマンドでポート25番がLISTEN状態になっているか確認します。
$ netstat -na | grep LISTEN
〜
tcp4       0      0  *.25                         *.*                    LISTEN
〜
2) Posifixの設定確認
 postconfコマンドでPostfixの設定を確認します。
$ postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
enable_server_options = yes
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 0
mydestination = $myhostname, localhost.$mydomain
mydomain = ddo.jp
mydomain_fallback = localhost
myhostname = y-naito.ddo.jp
mynetworks_style = subnet
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_pw_server_security_options = plain, login
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_use_pw_server = yes
unknown_local_recipient_reject_code = 450
 実は私はPostfix Enablerの設定が何ヶ所か気に入らなかったので、手作業で設定を修正してあります。(別に、そう神経質になるほどの事でもないとは思いますが・・・)
 手作業で修正する場合はファイル"/etc/postfix/main.cf"を適当なエディタを使って管理者権限で行います。(例:sudo vi /etc/postfix/main.cf)注意すべき事は、通常の設定記述のずっとずっと後ろの方に"# THE FOLLOWING DEFAULTS ARE SET BY APPLE"以下15行ほどアップルがデフォルトを上書きしてしまった箇所と、"###Start PostfixEnabler###"で始まる Postfix Enabler が付け足して設定を上書きする箇所がある事です。設定内容は後の方が有効になるので、前の方を修正しても有効にならない事があるので注意が必要です。
 修正した個所は、
mydomain = y-naito.ddo.jp
myhostname = y-naito.ddo.jp
myorigin = $myhostname
です。良く見ればmydomain =myorigin =をデフォルト状態に戻しただけですね。書き換えたらpostfixを再起動して設定を反映させます。
$ sudo postfix reload
postfix/postfix-script: refreshing the Postfix mail system

3) 接続テスト
 telnetで接続できるか確認します。
$ telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 y-naito.ddo.jp ESMTP Postfix
quit
221 Bye
Connection closed by foreign host.

4) 第三者中継チェック
 ここまで動作確認できたら、第三者がスパムメールなどの中継のために不正に使われる可能性がないか調べます。調べるには、
- RBL.jp
- 有限会社長崎ネットワークサービス
を使います。チェックには時間がかかりますので辛抱強く待ちましょう。待っている間、
$ cat /var/log/mail.log
でも見てアクセスが届いているか、そして全てが reject されているか眺めていましょう。


< 過去の記事 [ 6月の メールサーバ リスト ] 新しい記事 >

2004 calendar
6月
12345
6789101112
13141516171819
20212223242526
27282930


掲示板
最新:08/15 17:19


GsBlog was developed by GUSTAV, Copyright(C) 2003, Web Application Factory All Rights Reserved.