[PR]
by amanatu
-->
カレンダー
«  «  2006 7月  »  »
25 26 27 28 29 30 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

メインメニュー

最新ブログエントリ

エンジニアアイテム


最近のコメント

最近のトラックバック

アーカイブ


メルマガ登録 ID: 0000209784
UNIXのおべんきょしませんか?
 
バックナンバー powered by まぐまぐトップページへ
ブログ - 最新エントリ
 最新エントリ配信

最新エントリ
2006/07/04
カテゴリ: Miscellaneous : 

執筆者: unix (5:47 pm)
最近はメールサーバで非常にスパムが多くなっている。
世の中の管理者誰もが悩んでいるでしょう。

スパムは自分が管理するメールサーバ上の
存在しないユーザにも送りつけられてきます。

そういう時普通はUser unknownを返します。

その返し方がqmailとpostfixで違いがあります。

■postfix上で存在しないユーザに送りつけると
[05:04pm root@home3 /]# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 aroman.mine.nu ESMTP Postfix (2.2.0)
helo a
250 aroman.mine.nu
mail from:user@example.com
250 Ok
rcpt to:noexistent@aroman.mine.nu
550 <noexistent@aroman.mine.nu>: Recipient address rejected: User unknown in local recipient table
421 aroman

となり配送できないユーザの場合はSMTPセッション中に
エラーを返します。


■qmail上で存在しないユーザに送りつけると
[root@as4 ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to locahost.localdomain (127.0.0.1).
Escape character is '^]'.
220 as4.test.com ESMTP
helo a
250 as4.test.com
mail from:user@example.com
250 ok
rcpt to:noexistent@as4.test.com
250 ok
data
354 go ahead
.
250 ok 1151946698 qp 10695
quit
221 as4.test.com
Connection closed by foreign host.

となり一度受け入れます。
ログには↓のように出ています。

new msg 1755097
info msg 1755097: bytes 170 from <user@example.com> qp 10695 uid 501
starting delivery 36: msg 1755097 to local noexistent@as4.test.com
status: local 1/10 remote 0/20
delivery 36: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
status: local 0/10 remote 0/20
bounce msg 1755097 qp 10698
end msg 1755097

そしてすぐに送信元にエラーメールを返します。

大体スパムの場合は送信元は偽装のアドレスなので
エラーメールを返すことはできません。

こういったやり取りをすべてのスパムに対して行うのは
非常に無駄でリソースの無駄遣いと管理者は思います。

※エラーを返すタイミングが違うので5.5.0と5.1.1とエラーコードが異なってきます。

【対策】
ではqmailもpostfixのようにSMTPセッション中にエラーを
返してしまえばいいのではないか?と考えるところだが
デフォルトではそれができない。しかし

qmail-realrcptto patch

のパッチをあてることで実現できる。

他にもSMTPセッション中に弾く方法はあるが
whitelistを登録しておいてそれ以外はSMTPセッション中に弾く。
というものになるのでwhitelistをメンテナンスしなくてはいけないという
無駄な管理が出てくるので、このパッチのようにメンテナンスの必要の
ない対策がベストだと考えられる。

qmailを作った1998年ころは今日のように大量のスパムは
想像できなかったのかもしれない。。。

現在はnetqmail-1.05が再配布されていますが
中身はqmail-1.03ですね。
パッチなどが含まれているだけです。
qmail-realrcpttoパッチは含まれていません。

技術コンテンツ全文検索

表示形式: ソート:

pitattomatch ADs
最新ニュースブロック
ヘッドラインブロック
新着リンク
ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
Powered by Xoops2.05  Theme Design by OCEAN-NET
copyright (c) 2003 All rights reserved.