Tips記事
» 2001年09月05日 00時00分 UPDATE

SMTPサーバに接続できない(メール送信できない)

[木田佳克,ITmedia]

 メールサーバ(SMTP)をインストールしていざ送信をしようとしても,クライアント(Windowsなど)から受け入れられないことがある。もちろん,SMTPの設定を見直す必要はあるが,SMTPサーバが接続を認めているかを確認しておけば,原因究明が早くなるだろう。

 次のようにtelnetで接続してみればよい。表示内容と操作に対する反応によって判断することが可能だ。グリーンの文字列は,自ら入力するものだ。

$ telnet mail.yourdomain.com 25
Trying mail.yourdomain.com...
Connected to mail.yourdomain.com.
Escape character is '^]'.
220 xxxx.mail.yourdomain.com ESMTP Sendmail 8.9.3; Mon, 31 Nov 2000
17:23:45 +0900 (JST)
helo xxxxx
250 xxxx.mail.yourdomain.com Hello xxxx.mail.yourdomain.com [xxx.xxx.xxx.xxx], pleased to meet you
mail from: xxxx@yourdomain.com
250 xxxx@yourdomain.com... Sender ok
rcpt to: helpdesk@zdnet.co.jp
250 helpdesk@zdnet.co.jp... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject: smtp connection test

test.
.
250 RAA14595 Message accepted for delivery
quit
221 xxxx.mail.yourdomain.com closing connection
Connection closed by foreign host.

 上記のように反応があればよいが,次のようにSMTPからの応答がない場合,サーバソフトの設定を疑ってみる必要がある。

 また,リレー設定がされているSMTPサーバに接続した場合,送信しようとすると拒否されるかを確かめておくのもよいだろう。

$ telnet mail.yourdomain.com 25
Trying xxx.xxx.xxx.xxx... telnet: Unable to connect to remote host: Connection refused

Copyright © ITmedia, Inc. All Rights Reserved.

注目のテーマ