4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] pattern matching for ...
FromSent OnAttachments
Eric d'AlibutJul 15, 2009 7:21 pm 
Eric d'AlibutJul 15, 2009 8:43 pm 
Sam VarshavchikJul 16, 2009 4:01 am 
Eric d'AlibutJul 16, 2009 10:43 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] pattern matching for IP addressActions...
From:Eric d'Alibut (eric@gmail.com)
Date:Jul 15, 2009 8:43:06 pm
List:net.sourceforge.lists.courier-maildrop

On Wed, Jul 15, 2009 at 10:21 PM, Eric d'Alibut<eric@gmail.com> wrote:

Does anyone have a pattern-matching recipe for dotted-four IP  addresses? I want to RECVD to contain the IP address in $MATCH. I should add that the MTA in use is qmail.

Here's what I have so far, which seems to work:

# get Received into a var foreach(/^Received:.*/) $MATCH =~ /[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/ SENDINGIP = $MATCH

I don't understand how to test the results of the '=~' for success or failure. '$MATCH' is a string, so how do I look for either a 1 or a 0?

Thanks,

------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge