Re: [exim] How to Remove new line or space (or how to escape…

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: exim-users
Subject: Re: [exim] How to Remove new line or space (or how to escape dkim selector)
* on the Thu, Oct 17, 2013 at 04:42:39PM +0200, Marcin Miros??aw wrote:

> I'd like to setup configuration which supports keeping DKIM key&selector
> in files. In one file I'd like to keep selector. Content of the file can
> be "string" or "string\n" or ... "\nstring\n\n". No one pay attention if
> there is new line on the end of last line.
> If I use selector which contains new line then Exim add new line to
> headers. Then all headers are messed up.
> As I can see I can't use ${tr} to remove a sign, which function could be
> usefull in this case?


root@glue:~# exim4 -be '${sg{Foo\nBar\nWibble}{}{}}'
Foo
Bar
Wibble
root@glue:~# exim4 -be '${sg{Foo\nBar\nWibble}{\n}{}}'
FooBarWibble
root@glue:~#

-- 
Mike Cardwell  https://grepular.com/     http://cardwellit.com/
OpenPGP Key    35BC AF1D 3AA2 1F84 3DC3  B0CF 70A5 F512 0018 461F
XMPP OTR Key   8924 B06A 7917 AAF3 DBB1  BF1B 295C 3C78 3EF1 46B4