Link to home
Start Free TrialLog in
Avatar of lewisig
lewisig

asked on

Display Sending Server IP from the Header in Outlook Field

Is it possible to add a field in Outlook that will display the sending servers IP address? I am using the SPF check field from Microsoft already. I am looking for something similar. Here's what I want to accomplish:

Emails tagged as spam by GFI on the Exchange Server are forwarded to a designated "SPAM" mailbox to catch any legit emails for fallback purposes. I'd like to sort all emails in this box by the sending servers IP address.
Avatar of David Lee
David Lee
Flag of United States of America image

Hi, lewisig.

From an Outlook client perspective "yes" that is possible, but it will require some scripting.  A script will have to retrieve the header, parse it for the sending server's IP address, create a user-defined property in the Outlook item, insert the IP address in the property, and save the item.  The script will have to run at the client.  I can help with the script and instructions for using it if you want to go this route.
Avatar of lewisig
lewisig

ASKER

Sounds appropriate. Unfortunately, I do not know scripting well so any help would be appreciated.
No problem.  What version of Outlook do you use?
Avatar of lewisig

ASKER

2003 and 2007.  If it has to be one, let's go with 2003
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lewisig

ASKER

Instead of running a macro on selected messages, is there a method to extract the unique header information to a column for sorting? Can the unigue mark to identify the sending mail server in the message header be the combination of "Received: from" and "by mail.myserver.com"?

examples:

Received: from JSTQIDTOA ([115.138.6.53] RDNS failed) by mail.myserver.com
Received: from host-54-254.compi.net.pl ([194.187.54.254]) by mail.myserver.com
"is there a method to extract the unique header information to a column for sorting"
That's exactly what the code is doing.  A column is composed of the values of a given property for each item.  The information you want from the header isn't part of Outlook's object model, i.e. it's not a property.  So the first step is to read each message (each selected message), pull that information from the header, and put it into a user-defined property.  That's what allows you to add a column showing the information.  

"Can the unigue mark to identify the sending mail server in the message header be the combination of "Received: from" and "by mail.myserver.com"?"
Sure.  But how does that help if the message passed through 4 or 5 servers on its way to you?  So long as the server names are all in order and all messages headers are formatted in exactly the same way, then the code should work without any problem.  My point was that none of the servers listed in the header are uniquely marked or tagged as being the server of origin.  
Avatar of lewisig

ASKER

Never got around to this, sorry. Found a work around.
I don't mind that you found a workaround, but why give me the lowest grade possible for putting in the effort to help out?