個人的なメモを記していくためのページです。
* WIDE Universityなんて試みがあるの知らなかった。
:0B: * .*voila%2Efr tmp2/.というレシピを追加。これでtmp2というフォルダに問題のメールは分離できる。
#!/usr/local/bin/perl
while(<>){
next unless (/^Received/ );
chomp;
foreach $i ( ($h) = /(([\w\.\-]+\.)+[a-zA-Z]{2,3})($|[^.\w])/ ){
# print "$i\n" if( $i );
}
foreach $i( /([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/g){
print "$i\n";
}
}
というスクリプトでreceivedからIPアドレスとドメイン名を抜き出しても1箇所からじゃない。
$ /usr/bin/perl ~/foo.pl * |sort | uniq -c | sort -n | tail -n 20
21 221.29.132.95
21 mwinf3104.me.freeserve.com
21 mwinf3111.me.freeserve.com
22 67.11.199.220
23 193.252.22.156
23 213.180.234.250
24 213.171.219.240
24 217.12.12.192
24 5.0.2195.6713
24 mwinf3107.me.freeserve.com
25 68.201.153.163
27 195.50.106.135
29 193.252.22.158
30 24.95.59.194
32 server219-spam240.livedns.org.uk
65 193.252.22.157
198 mx.***.co.jp
315 mail.****.co.jp
513 **.***.**.**
547 127.0.0.1
$ perl ~/foo.pl * | tr -cs a-zA-Z0-9 '\n'|sort | uniq -c | sort -n | tail -n 20
34 org
36 ox
55 c
58 client
78 24
78 comcast
78 rr
123 ac
198 ****
265 ukl
265 yahoo
298 uk
304 net
360 me
362 freeserve
514 ***
533 jp
620 co
627 ****
853 com
クラシック・ドーム
ソフト・ドーム
ソフト・リム