Hello all, I have a problem with a specific regex in a PCRE-map.
This is my setup: Postfix version(packet from the Debian Lenny): # dpkg -s postfix | grep ^Ver Version: 2.5.5-1.1 main.cf ======= local_header_rewrite_clients = permit_inet_interfaces, permit_mynetworks recipient_canonical_maps = pcre:/etc/postfix/pcre-recipient_canonical The map contains: ================= # cat /etc/postfix/pcre-recipient_canonical /^[[:alnum:]]{7}-0xrockindahouse0x-(....@.+)$/ $1 The map works quite well, except with some quirky but valid(AFAIK) email addresses. If there is a dot directly before the '@' or two dots in the address the regex doesn't work. Meaning the rcpt_to is not rewritten. Here some examples: # echo aloha | \ mailx -s "test" bmiej7f-0xrockindahouse0x-i.asim...@provider.de # grep asimov /var/log/mail.log Sep 22 11:40:03 mailx postfix/smtp[17534]: 23477B0B62: to=<bmiej7f-0xrockindahouse0x-i.asim...@provider.de>, relay=none, delay=0.12, delays=0.07/0/0.04/0, dsn=5.4.6, status=bounced The same happens with the following addresses to: bn93ij5-0xrockindahouse0x-iasimov-st....@provider.de bngr21b-0xrockindahouse0x-i..asi...@provider.com If I try the regex with a plain Perl-script it all works fine: tmp > cat test.pl #!/usr/bin/perl -w use strict; my $in = shift; $in =~ s/^[[:alnum:]]{7}-0xrockindahouse0x-(....@.+)$/$1/; print "$in\n"; tmp > ./test.pl bmiej7f-0xrockindahouse0x-i.asim...@provider.de i.asim...@provider.de tmp > ./test.pl bn93ij5-0xrockindahouse0x-iasimov-st....@provider.de iasimov-st....@provider.de Hopefully someone can help me out here. Thanks in advance, Markus