Re: [exim] "${strlen" is not a known operator ...

Top Pagina
Delete this message
Reply to this message
Auteur: Ian Eiloart
Datum:  
Aan: Exim
Onderwerp: Re: [exim] "${strlen" is not a known operator ...

> On 16 Mar 2016, at 18:44, Jeremy Harris <jgh@???> wrote:
> 
> On 16/03/16 18:23, Ian Eiloart wrote:
>> I have these lines in a router (they’re designed to mitigate the "reply-all" problem after someone spams the entire campus):
>> 
>>    headers_remove = \
>>        Bcc \
>>        ${if  > { ${strlen:$header_To: } } {4096}  { : To }}\
>>        ${if  > { ${strlen:$header_Cc: } } {4096} { : Cc }}
> 
> 
>> "failed to expand headers_add or headers_remove: "${strlen" is not a known operator (or a } is missing in a variable reference)"
> 
> http://exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_routers.html
> 
> "Warning 3: Because of the separate expansion of the list items, items
> that contain a list separator must have it doubled. To avoid this,
> change the list separator (6.20). "


Thanks, that’s a useful caution. But after expansion, it should look like this (assuming both headers are very long):

headers_remove = \
    Bcc \
    : To \
    : Cc

So the list separator isn’t the issue.

RESOLVED: it turns out my problem is due to this bug, which was fixed in version 4.85. It must have been introduced after
 4.76 at some point. 

JH/06 Bug 1533: Fix truncation of items in headers_remove lists.  A fixed
      size buffer was used, resulting in syntax errors when an expansion
      exceeded it.
-- 
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148