>>> Op 17-11-2009 om 12:48 is door Wietse Venema <wie...@porcupine.org>
geschreven:
> Arjan Melein:
>> It's been a few days but i just ran into a little bump in the road.. It 
> looks like the ;1:1 actually changes depending on the number of recipients.
>> How would I change '/^RCPT\s+TO:(.*);1:1$/     RCPT TO:$1' into matching 
> 'domain.tld;#:#' and put the domain.tld back without the ;#:#
> 
> What does the # stand for? If it is one digit, replace 1 by [0-9],
> to handle multiple digits, replace 1 by [0-9]+
> 
> You can test this with:
> 
> postmap -q "RCPT TO:<x.y.z> ORCPT=rfc822;a...@b.c;3;4" pcre:/file/name
> 
>       Wietse

I thought it was 1 number at first, but it seems to be going multi digit as 
well..
I changed it into "/^RCPT\s+TO:(.*);[0-9]+:[0-9]+$/     RCPT TO:$1"  and it 
seems to work.

If I've learned one thing from this, its that I really need to brush up on 
regexp :-)

-
Arjan

Reply via email to