On Fri, Apr 03, 2009 at 03:14:46PM -0400, Rob Morris wrote:
> All, I'm trying to get an exim string expansion to take a literal string 
> (eg from a file lookup) like this:
> 
>     "This is a first line\nThis is a second"
> 
> and turn it into
> 
>     "This is a first line
>     This is a second"
> 
> Seems the correct thing is to do:
> 
>     "${sg {...value...}{\N\\n\N}{\n}}"

That works for me with Exim 4.68:

$ cat /tmp/test
This is a first line\nThis is a second

$ /usr/lib/exim/exim -be
> ${readfile{/tmp/test}}
"This is a first line\nThis is a second"

> ${sg{${readfile{/tmp/test}}}{\N\\n\N}{\n}}
"This is a first line
This is a second"

> Any ideas on how I can get this to work correctly?
> 
> PS: in case context matters, the full line is in a transport, and is:
> 
>     text = "${sg 
> {${lookup{$local_part}lsearch{/var/mail/sites/${domain}/.vacations}}}{\N\\n\N}{\n}}"

Maybe something is happening further in the transport.  Hard to say
without more info.

--
Dean Brooks
[email protected]

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

Reply via email to