Moderators: Eric, Tomas, robin, Michael
execute "notepad.exe" "c:\program files\poco mail 3\#news.txt"
exit
Call GetOriginatingIPAddress
MessageBox $OriginatingIPAddr
Exit
{***************************************************************************************************************************************
{ Function : GetOriginationIPAddress
{ Description : Gets the originating IP address from the received headers.
{ Method : The script examines the "Received" headers of a message and takes the 1st string bracketed by
{ square brackets ("[" and "]") from the last received header to contain such a string and reports it.
{ Inputs : %Message
{ Outputs : $OriginatingIPAddr - The originating IP address.
{***************************************************************************************************************************************
:GetOriginatingIPAddress
{
{ Method: The script examines the "Received" headers of a message and takes the 1st string bracketed by
{ square brackets ("[" and "]") from the last received header to contain such a string and reports it.
ReadAllHeaders $headers %message
Set $OriginatingIPAddr ""
:RcvdLoop
LineCount #l $headers
If #l = 0 Then Return
LocateLine #l "Received:" $headers
If #l < 0 Then Return
GetLine $line #l $headers
DeleteLine $headers #l 1
StringPos #l "[" $line
If #l = 0 Then RcvdLoop
ChopString $line 1 #l
StringPos #l "]" $line
If #l = 0 Then RcvdLoop
ChopString $line #l 9999
Set $OriginatingIPAddr $line
GoTo RcvdLoop
Return
Return to Junk Mail Filtering Help and How-To
Users browsing this forum: No registered users and 1 guest