Re: [exim] Question regarding unseen

Top Page
Delete this message
Reply to this message
Author: Fred Viles
Date:  
To: exim-users
Subject: Re: [exim] Question regarding unseen
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*} {$1@$2} }
|
| 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} {\N$1@$2\N} }

| root@buick:~# sendmail -bt liste@???
| R: ldap_user liste@???
| liste@??? 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