Re: Deliver to sender instead of recipient
- On Thu, Jul 25, 2013 at 08:26:24PM +0200, Ralf Hildebrandt wrote:
> * Wietse Venema <wietse@...>:I thought the same thing when I saw this, and I referred to the
> > Fernando Gozalo:
> > > How can I deliver the messages to the mailbox of the sender
> > > instead of the mailbox of the recipient?
> > /etc/postfix/main.cf:
> > smtpd_sender_restrictions = pcre:/etc/postfix/sender_access
> > /etc/postfix/sender_access:
> > /.+/ redirect $1
> Doesn't this require ()?
> /(.+)/ redirect $1
Substitution of substrings from the matched expression
into the result string is possible using the conventional
perl syntax ($1, $2, etc.); ...
Basically it says "see the Perl documentation for their syntax."
I lost interest at that point. :) But I got reinterested with your
post, and made a simple test:
$ echo -e '/.+/ redirect $1\n/(.+)/ redirect $1' > pcre
$ /usr/sbin/postmap -q testing pcre:./pcre
postmap: warning: pcre map ./pcre, line 1: out of range replacement index "1": skipping this rule
> or are the () implied if there's only one match groupSo no, apparently you are right. Or this might vary with different
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
- On Thu, Jul 25, 2013 at 03:03:57PM -0500, /dev/rob0 wrote:
> > Doesn't this require ()?Yes, it does.
> > /(.+)/ redirect $1
> > or are the () implied if there's only one match groupNo, this behaviour should be the same for all versions of PCRE.
> So no, apparently you are right. Or this might vary with different
> PCRE implementations?