Συντάκτης: Marcin Mirosław Ημερομηνία: Προς: exim-users Αντικείμενο: Re: [exim] How to Remove new line or space (or how to escape dkim
selector)
W dniu 17.10.2013 16:58, Mike Cardwell pisze: > * 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:~#
Thanks! I saw word "Perl" in description of ${sg} and I wrongly assumed
it launch perl engine.
I'd like to ask for help in one more thing. I've got problem with nested
braces:
$ exim -be '${sg{
{${readfile{/etc/exim/dkim/test2.test.com.pl.selector}} } {\n|\ }{} }}'
{131017}
But I'm expecting to get only digits.
When I remove braces arround ${readfile I'm getting:
$ exim -be '${sg{
${readfile{/etc/exim/dkim/test2.cadera.com.pl.selector}} {\n|\ }{} }}'
Failed: missing or misplaced { or }