I'm looking for regular expressions that I can use in Received headers to pick out IP addresses and use that to look up blacklist information on mail that has been forwarded to me from other sources. Normally email comes directly to my servers and that's easy to check the hosts for blacklists. However when spam that is forwarded from other servers that send good email the blacklists checks don't work. So I need to pull IP addresses out of the Received headers to check where the message has been.
So - What I need is a regular expression to grab say the second or third IP address back in the list and stick that into a variable that I can use then to look up against blacklists. Or perhaps grab the last, second to the last IP addresses. Thanks in advance for your help. -- ## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
