|
やっぱり、Received:ヘッダに発信国を入れても、1つ1つのReceived:ヘッダ
が非常に長くてとても見にくいんで、あんまり意味が無いような気がします。
僕は以下のようなマクロで見てるんですけど、それでいいんじゃないでしょう
か。
loaddll "tkinfo.dll";
#c = dllfunc("CountCurrentHeader", "Received:");
while( #i < #c ) {
$header = dllfuncstr("CurrentHeader2", "Received:", #i );
$header = "Received: " + $header;
$ip = dllfuncstr("GetSenderIP", $header );
$country = dllfuncstr("GetSenderCountry", $header );
$message = $message + "[" + $ip + "], " + $country + "\r\n";
#i = #i + 1;
}
message $message;
それか、ヘッダに書き込んでおいて常に見たいということであれば、
loaddll "tkinfo.dll";
if( dllfuncstr("CurrentHeader", "X-SenderCountry:") != "" ) {
endmacro;
}
#n = dllfunc("BeginEditMail");
#c = dllfunc("CountCurrentHeader", "Received:");
while( #i < #c ) {
$header = dllfuncstr("CurrentHeader2", "Received:", #i );
$header = "Received: " + $header;
$ip = dllfuncstr("GetSenderIP", $header );
$country = dllfuncstr("GetSenderCountry", $header );
#n = dllfunc("AddHeader"
, "X-SenderCountry:", "[" + $ip + "], " + $country);
#i = #i + 1;
}
#n = dllfunc("SaveEditMail", 0, 0);
ってなマクロを必要に応じて実行するとか。
|
|