On 6 Sep 2005 at 19:16, Stian Jordet wrote about
    "Re: [exim] Question regarding unsee":

| man, 05,.09.2005 kl. 23.04 +0100, skrev Tony Finch:
|...
| > The answer is probably to use ${sg, e.g.
| > ${sg {$address_data} {\s*uid="([^"]*)"\s*mailHost="([^"]*)"\s*} [EMAIL 
PROTECTED] }
| 
| Thanks you very, very much for helping me out here. But this didn't
| work, and unfortunately, regexps are greek to me :( Is it anything wrong
| with it, or am I just stupid?

One problem is Tony apparently forgot that all three string arguments 
to ${sg are expanded, so the regex and replacement strings need to be 
escaped to protect the \ and $ characters.  Try this (also untested):

${sg {$address_data} {\N\s*uid="([^"]*)"\s*mailHost="([^"]*)"\s*\N} [EMAIL 
PROTECTED] }

| [EMAIL PROTECTED]:~# sendmail -bt [EMAIL PROTECTED]
| R: ldap_user [EMAIL PROTECTED]
| [EMAIL PROTECTED] cannot be resolved at this time:
|   error in redirect data: missing or malformed local part (expected word
| or "<") in "uid="stianj" mailHost="buick.jordet.net""

This shows that no substitutions took place.

- Fred





-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to