Re: [Exim] String expansion headaches

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Greg Ward
Datum:  
To: exim-users
Betreff: Re: [Exim] String expansion headaches
On 15 October 2002, I said:
> So here's my slightly simplified version of this command (left the
> quotes in because I don't understand them; braces are still unbalanced):
>
>   command = MM21_WRAP \
>              "${if def:local_part_suffix\
>                   {${sg{$local_part_suffix}{\N-(\w+)(\+.*)?\N}{\$1}}\
>                   {post}}" \
>              ${lc:$local_part}

>
> When I try to deliver a message via this transport using my simplified
> command, Exim barfs on the regex:


Well, I took a break to work on other things for a while, and then
managed to get this to work. The key was to *single* quote the hairy if
expansion:

  mailman_transport:
    driver = pipe
    command = MAILMAN_WRAP \
              '${if def:local_part_suffix \
                    {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
                    {post}}' \
              $local_part
    [...]


Yes, I know I could use \N...\N, but so far the same transport works
with Exim 3 and 4, and the two doubled backslashes are not so painful.

If anyone is using Mailman 2.1 on Exim 3, I'd like to know if this
works. It does for me with Exim 4, but you never know.

        Greg
--
Greg Ward <gward@???>                         http://www.gerg.ca/