7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

smtpをtcpdumpでキャプチャしwiresharkで解析してみた

Last updated at Posted at 2014-12-19
  • open relay checkerでメールサーバがopen relay状態かチェック出来ます。

@icloud.com のキャプチャ

icloud.comのメールサーバを確認
# dig mx icloud.com +short | sort
10 mx1.mail.icloud.com.
10 mx2.mail.icloud.com.
10 mx3.mail.icloud.com.
10 mx4.mail.icloud.com.
10 mx5.mail.icloud.com.
10 mx6.mail.icloud.com.
tcpdump
sudo /usr/sbin/tcpdump -w dump.cap -A -i eth0 port 25 and host \
 \(mx1.mail.icloud.com \
or mx2.mail.icloud.com \
or mx3.mail.icloud.com \
or mx4.mail.icloud.com \
or mx5.mail.icloud.com \
or mx6.mail.icloud.com \
or icloud.com \)

helocheck.abuseat.org宛メールをキャプチャ

/usr/sbin/tcpdump -w dump.cap -A -i bond0 -s 0 port 25 \
  and host helocheck.abuseat.org

echo "hoge" | mail helocheck@helocheck.abuseat.org
  • -sでサイズを指定。初期設定は96(centos5)か65535(centos6)。0で無制限

wireshark

dump.capを読みこんで実行
sudo wireshark -r dump.cap
  • 起動しない!?と思っていたら実行にsudoが必要でした。
  • また、sudo ln -s /opt/X11 /usr/X11が必要っぽかったです。
フィルタ例
smtp.req.command == "HELO" or smtp.req.command == "EHLO"

参考

7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?