Sendmail SMART_HOST が動作しない

Sendmail SMART_HOST が動作しない

SMART_HOST を特定のサーバーとして定義しました。これを foo.bar.com とします。しかし、'sendmail -t' を使用してテスト メールを送信すると、sendmail は mx.bar.com を使用しようとし、その結果メールが拒否されます。foo.bar.com は機能し、mx.bar.com は機能しないことを確認しました (やった、telnet)。sendmail.mc を vi make、make -C、および m4 で再コンパイルしました。sendmail.cf の DS エントリを確認しました。sendmail を正しく再起動しました。この時点でどのように進めればよいかわかりません。何かアイデアはありますか?

私の SMART_HOST 行は次のとおりです:

定義( SMART_HOST',foo.bar.com')dnl

...そして、これがテストメールの結果です。foo.bar.com を使用することはなく、代わりに mx.bar.com を使用します。

$ echo subject: test; echo | sendmail -Am -v -flocaluser -- [email protected] subject: test
[email protected]... Connecting to mx.bar.com via relay...
220 mx.bar.com ESMTP
>>> EHLO myhost.bar.com
250-mx.bar.com
250-8BITMIME
250 SIZE 52428800
>>> MAIL From:<[email protected]> SIZE=1
250 sender <[email protected]> ok 
>>> RCPT To:<[email protected]>
550 #5.1.0 Address rejected.
>>> RSET
250 reset
localuser... Connecting to local...
localuser... Sent
Closing connection to mx.bar.com.
>>> QUIT
221 mx.bar.com

最後に、foo.bar.com を使用して送信されたテストメールを次に示します。

$ hostname
myhost.bar.com
$ telnet foo.bar.com 25
Trying ***.***.***.***...
Connected to foo.bar.com (***.***.***.***).
Escape character is '^]'.
220 foo.bar.com ESMTP Sendmail 8.14.1/8.14.1/ITS-7.0/ldap2-1+tls; Tue, 21 Dec 2010 13:27:44 -0700 (MST)
helo foo
250 foo.bar.com Hello myhost.bar.com [***.***.***.***], pleased to meet you
mail from: [email protected]
250 2.1.0 [email protected]... Sender ok
rcpt to: [email protected]   
250 2.1.5 [email protected]... Recipient ok
data
354 Enter mail, end with "." on a line by itself
testing 
.
250 2.0.0 oBLKRikZ003758 Message accepted for delivery
quit
221 2.0.0 foo.bar.com closing connection
Connection closed by foreign host.

何か案は?

ありがとう

答え1

Sendmail はドメインで MX ルックアップを実行している可能性がありますが、これは必ずしも望ましい動作ではありません。これを防ぐには、ホスト名を角括弧で囲みます。

define(`SMART_HOST',`[foo.bar.com]')dnl

関連情報