Postfixのメールログを確認する


図解60p「Linuxサーバー構築入門マニュアル」無料
登録10秒/自動返信でDL/合わなければ解除3秒

Postfixのログは、「/var/log/maillog」ファイルに出力されます。
1週間単位で自動ローテションされ、/var/log/maillogファイルの他に
「/var/log/maillog.1」〜「/var/log/maillog.4」までの4週間分を
歴として保持しています。

何かトラブルが発生した際、「/var/log/maillog」ファイルを
確認することで多くの原因を特定することができます。

■メールログファイル(/var/log/maillog)を確認する
# ls -l /var/log/maillog*
-rw------- 1 root root 1941316 7月 24 16:47 /var/log/maillog
-rw------- 1 root root 10497049 7月 23 04:02 /var/log/maillog.1
-rw------- 1 root root 10312833 7月 16 04:02 /var/log/maillog.2
-rw------- 1 root root 10810720 7月 9 04:02 /var/log/maillog.3
-rw------- 1 root root 9886779 7月 2 04:02 /var/log/maillog.4

■メールログファイルの内容を確認する
# tail /var/log/maillog
Jul 24 16:47:28 Mail_001_Enetmercury postfix/smtpd[30065]: warning: unknown[80.82.XX.XX]: SASL LOGIN authentication failed: authentication failure
Jul 24 16:47:29 Mail_001_Enetmercury postfix/smtpd[30065]: disconnect from unknown[80.82.XX.XX]
Jul 24 16:48:04 Mail_001_Enetmercury postfix/qmgr[1388]: 03D037E257: from=, size=20169, nrcpt=1 (queue active)
Jul 24 16:48:05 Mail_001_Enetmercury postfix/smtp[29975]: 03D037E257: to=, relay=none, delay=60457, delays=60456/0.01/0.87/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.co.jp type=MX: Host not found, try again)
Jul 24 16:49:44 Mail_001_Enetmercury postfix/qmgr[1388]: 813897E249: from=, size=15939, nrcpt=1 (queue active)
Jul 24 16:50:14 Mail_001_Enetmercury postfix/smtp[29975]: connect to aaa.com[63.240.XXX.XXX]: Connection timed out (port 25)
Jul 24 16:50:14 Mail_001_Enetmercury postfix/smtp[29975]: 813897E249: to=, relay=none, delay=60582, delays=60552/0/30/0, dsn=4.4.1, status=deferred (connect to aaa.com[63.240.178.216]: Connection timed out)
Jul 24 16:50:49 Mail_001_Enetmercury postfix/anvil[30067]: statistics: max connection rate 1/60s for (smtp:80.82.XX.XX) at Jul 24 16:47:27
Jul 24 16:50:49 Mail_001_Enetmercury postfix/anvil[30067]: statistics: max connection count 1 for (smtp:80.82.XX.XX) at Jul 24 16:47:27
Jul 24 16:50:49 Mail_001_Enetmercury postfix/anvil[30067]: statistics: max cache size 1 at Jul 24 16:47:27




無料プレゼント
図解60p「Linuxサーバー構築入門マニュアル」
独学で詰まる前に、“型(手順書)”で最初の環境構築をサクッと終わらせましょう。
登録10秒/自動返信でDL/合わなければ解除3秒
無料で受け取る ※メールアドレスだけでもOK(必須項目は最小限)

宮崎 智広

この記事を書いた人

宮崎 智広(みやざき ともひろ)

株式会社イーネットマーキュリー代表。現役のLinuxサーバー管理者として15年以上の実務経験を持ち、これまでに累計3,100名以上のエンジニアを指導してきたLinux教育のプロフェッショナル。「現場で本当に使える技術」を体系的に伝えることをモットーに、実践型のLinuxセミナーの開催や無料マニュアルの配布を通じてLinux人材の育成に取り組んでいる。

<<関連記事>>
・MIMEでエンコードされたテキストを読めるように変換する
・viエディタで文字をコピーする
・ハードディスクの使用状況を調べるには
・tar.bz2ファイルの解凍・圧縮コマンド|tar.gzとの違いやオプション一覧
・tar.gz形式のファイルを解凍、展開するには

図解60pのLinux無料マニュアル
登録10秒/自動返信でDL
無料で受け取る